diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 8617f85b70..0979aa9ccc 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -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'] = ''.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; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index f954d9d3a9..e475f3b0b4 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -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; diff --git a/pandora_console/include/styles/agent_manager.css b/pandora_console/include/styles/agent_manager.css index 534fc14bb7..cecff8f9ac 100644 --- a/pandora_console/include/styles/agent_manager.css +++ b/pandora_console/include/styles/agent_manager.css @@ -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; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index bb7743c37d..46159a5bb3 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -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; } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index a2e75bb996..0a30be6108 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -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;