From c633d091be22b28661b1d04eccca99466be49d67 Mon Sep 17 00:00:00 2001 From: zarzuelo <noreply@pandorafms.org> Date: Thu, 6 Jun 2013 15:57:11 +0000 Subject: [PATCH] 2013-06-06 Sergio Martin <sergio.martin@artica.es> * include/functions_config.php: Replaced netflow and visual console flags updation in setup by a new customize sections values * include/config_process.php: Added specific metaconsole autorefresh whitelisted sections * extensions/snmp_explorer.php: Change wrong snmp branch in interfaces explorer git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8263 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 12 ++++++++++++ pandora_console/extensions/snmp_explorer.php | 2 +- pandora_console/include/config_process.php | 9 +++++++++ pandora_console/include/functions_config.php | 16 ++++++++++------ 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 331f4f94b3..2ab682c15c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2013-06-06 Sergio Martin <sergio.martin@artica.es> + + * include/functions_config.php: Replaced netflow and + visual console flags updation in setup by a new customize + sections values + + * include/config_process.php: Added specific metaconsole + autorefresh whitelisted sections + + * extensions/snmp_explorer.php: Change wrong + snmp branch in interfaces explorer + 2013-06-06 Sergio Martin <sergio.martin@artica.es> * include/ajax/events.php: Fix the info of the diff --git a/pandora_console/extensions/snmp_explorer.php b/pandora_console/extensions/snmp_explorer.php index cb84ca0081..4cab7d06dd 100755 --- a/pandora_console/extensions/snmp_explorer.php +++ b/pandora_console/extensions/snmp_explorer.php @@ -56,7 +56,7 @@ function snmp_explorer() { $snmpis = get_snmpwalk($ip_target, $snmp_version, $snmp_community, $snmp3_auth_user, $snmp3_security_level, $snmp3_auth_method, $snmp3_auth_pass, - $snmp3_privacy_method, $snmp3_privacy_pass, 0, ".1.3.6.1.2.1", $tcp_port); + $snmp3_privacy_method, $snmp3_privacy_pass, 0, ".1.3.6.1.2.1.2", $tcp_port); if ($snmpis === false) { $snmpis = array(); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fbe81f3c5d..8c3d765429 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -222,6 +222,15 @@ $config['autorefresh_white_list'] = array( 'operation/agentes/networkmap', 'enterprise/operation/services/services', 'operation/events/events'); + +// Specific metaconsole autorefresh white list sections +if (defined('METACONSOLE')) { + $config['autorefresh_white_list'][] = 'monitoring/tactical'; + $config['autorefresh_white_list'][] = 'monitoring/group_view'; + $config['autorefresh_white_list'][] = 'operation/tree'; + $config['autorefresh_white_list'][] = 'screens/screens'; +} + //====================================================================== diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index aa76ae5922..331ca9c089 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -973,17 +973,21 @@ function config_process_config () { } if(defined('METACONSOLE')) { - if (!isset ($config['show_vc'])) { - config_update_value('show_vc', 1); + // Customizable sections (Metaconsole) + enterprise_include_once ('include/functions_enterprise.php'); + $customizable_sections = enterprise_hook('enterprise_get_customizable_sections'); + + if($customizable_sections != ENTERPRISE_NOT_HOOK) { + foreach($customizable_sections as $k => $v) { + if (!isset ($config[$k])) { + config_update_value($k, $v['default']); + } + } } if (!isset ($config['meta_num_elements'])) { config_update_value('meta_num_elements', 100); } - - if (!isset ($config['enable_metaconsole_netflow'])) { - config_update_value('enable_metaconsole_netflow', 0); - } } if (!isset ($config['relative_path']) && (isset ($_POST['nick'])