This commit is contained in:
fbsanchez 2021-09-29 20:56:39 +02:00
parent 15c2bdf17b
commit 696c59b258
5 changed files with 59 additions and 10 deletions

View File

@ -485,6 +485,13 @@ if ($id_agente) {
$collectiontab = '';
}
// NetworkConfigManager tab.
$ncm_tab = enterprise_hook('networkconfigmanager_tab');
if ($ncm_tab === ENTERPRISE_NOT_HOOK) {
$ncm_tab = '';
}
// Group tab.
$grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'.html_print_image(
'images/group.png',
@ -616,6 +623,7 @@ if ($id_agente) {
'main' => $maintab,
'remote_configuration' => $remote_configuration_tab,
'module' => $moduletab,
'ncm' => $ncm_tab,
'alert' => $alerttab,
'template' => $templatetab,
'inventory' => $inventorytab,
@ -631,6 +639,7 @@ if ($id_agente) {
'separator' => '',
'main' => $maintab,
'module' => $moduletab,
'ncm' => $ncm_tab,
'alert' => $alerttab,
'template' => $templatetab,
'inventory' => $inventorytab,
@ -699,6 +708,11 @@ if ($id_agente) {
$tab_name = 'Collection';
break;
case 'ncm':
$tab_description = '- '.__('Network config manager');
$tab_name = 'Network config manager';
break;
case 'inventory':
$tab_description = '- '.__('Inventory');
$help_header = 'inventory_tab';
@ -2313,6 +2327,10 @@ switch ($tab) {
include 'agent_incidents.php';
break;
case 'ncm':
enterprise_hook('ncm_agent_tab', [$id_agente]);
break;
case 'remote_configuration':
enterprise_include('godmode/agentes/agent_disk_conf_editor.php');
break;

View File

@ -2521,7 +2521,8 @@ function html_print_input_text(
$formTo='',
$onKeyUp='',
$disabled=false,
$list=''
$list='',
$placeholder=null
) {
if ($maxlength == 0) {
$maxlength = 255;
@ -2566,6 +2567,10 @@ function html_print_input_text(
$attr['list'] = $list;
}
if ($list !== null) {
$attr['placeholder'] = $placeholder;
}
return html_print_input_text_extended(
$name,
$value,
@ -4547,7 +4552,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['form']) === true) ? $data['form'] : ''),
((isset($data['onKeyUp']) === true) ? $data['onKeyUp'] : ''),
((isset($data['disabled']) === true) ? $data['disabled'] : false),
((isset($data['list']) === true) ? $data['list'] : '')
((isset($data['list']) === true) ? $data['list'] : ''),
((isset($data['placeholder']) === true) ? $data['placeholder'] : '')
);
break;

View File

@ -181,3 +181,12 @@ a#qr_code_agent_view {
#safe_mode_module {
margin-top: 0.6em;
}
.no-borders {
border: 0 !important;
}
.no-borders .white_table_graph_header {
border: 0;
padding-left: 0;
}

View File

@ -746,6 +746,12 @@ select:-internal-list-box {
.padding-right-2-imp {
padding-right: 2em !important;
}
.padding-left-2 {
padding-left: 2em;
}
.padding-left-2-imp {
padding-left: 2em !important;
}
.margin-soft {
margin: 0.3em 1em;
}

View File

@ -4030,8 +4030,8 @@ CREATE TABLE IF NOT EXISTS `tsync_queue` (
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_template` (
`id` serial,
`vendor` text,
`model` text,
`vendor` json,
`model` json,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -4058,17 +4058,27 @@ CREATE TABLE IF NOT EXISTS `tncm_template_scripts` (
FOREIGN KEY (`id_script`) REFERENCES `tncm_script`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_agents`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_agent` (
`id_agent` int(10) unsigned NOT NULL,
`vendor` text,
`model` text,
`protocol` int unsigned not null default 0,
`cred_key` varchar(100),
PRIMARY KEY (`id_agent`),
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tncm_agent_templates`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tncm_agent_templates` (
`id` serial,
`id_agent` int(10) unsigned NOT NULL,
`id_template` bigint(20) unsigned NOT NULL,
`protocol` int unsigned not null default 0,
`cred_key` varchar(100),
PRIMARY KEY (`id`),
PRIMARY KEY (`id_agent`, `id_template`),
FOREIGN KEY (`id_agent`) REFERENCES `tagente`(`id_agente`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`cred_key`) REFERENCES `tcredential_store`(`identifier`) ON UPDATE CASCADE ON DELETE SET NULL
FOREIGN KEY (`id_template`) REFERENCES `tncm_template`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;