diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 531b2acfb6..93aa60954e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2012-12-13 Miguel de Dios + + * godmode/agentes/module_manager_editor.php, + godmode/setup/setup.php, include/functions_config.php: cleaned + source code style. + + * include/functions_visual_map.php, include/functions_graph.php: + re-added lost code for the visualmap in metaconsole. + 2012-12-13 Ramon Novoa * include/functions_reporting.php, diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index bb18fb6e16..b7fd596580 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -470,11 +470,11 @@ $(document).ready (function () { //Check the name name = $("#text-name").val(); remote_config = $("#textarea_configuration_data").val(); - + regexp_name = new RegExp('module_name\\s*' + name.replace(/([^0-9A-Za-z_])/g, "\\$1") +"\n"); - + regexp_plugin = new RegExp('^module_plugin\\s*'); - + if (remote_config == '' || remote_config.match(regexp_name) || remote_config.match(regexp_plugin) || $("#id_module_type").val()==100 || diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 4501faf061..9c77c368b7 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -37,7 +37,7 @@ if (is_ajax ()) { unset($timezones[$timezone_key]); } } - + echo json_encode($timezones); } return; @@ -75,13 +75,16 @@ $table->size[1] = '70%'; switch ($config["dbtype"]) { case "mysql": - $current_system_lang = db_get_sql ('SELECT `value` FROM tconfig WHERE `token` = "language"'); + $current_system_lang = db_get_sql ('SELECT `value` + FROM tconfig WHERE `token` = "language"'); break; case "postgresql": - $current_system_lang = db_get_sql ('SELECT "value" FROM tconfig WHERE "token" = \'language\''); + $current_system_lang = db_get_sql ('SELECT "value" + FROM tconfig WHERE "token" = \'language\''); break; case "oracle": - $current_system_lang = db_get_sql ('SELECT value FROM tconfig WHERE token = \'language\''); + $current_system_lang = db_get_sql ('SELECT value + FROM tconfig WHERE token = \'language\''); break; } @@ -90,10 +93,12 @@ if ($current_system_lang == "") { } $table->data[0][0] = __('Language code for Pandora'); -$table->data[0][1] = html_print_select_from_sql ('SELECT id_language, name FROM tlanguage', +$table->data[0][1] = html_print_select_from_sql ( + 'SELECT id_language, name FROM tlanguage', 'language', $current_system_lang , '', '', '', true); -$table->data[1][0] = __('Remote config directory') . ui_print_help_tip (__("Directory where agent remote configuration is stored."), true); +$table->data[1][0] = __('Remote config directory') . + ui_print_help_tip (__("Directory where agent remote configuration is stored."), true); $table->data[1][1] = html_print_input_text ('remote_config', $config["remote_config"], '', 30, 100, true); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 95e5d4fb0a..dad75e74de 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -90,7 +90,7 @@ function config_update_config () { switch($sec2) { case 'godmode/setup/setup': //////// MAIN SETUP - config_update_value ('language', (string) get_parameter ('language')); + config_update_value ('language', (string) get_parameter ('language')); config_update_value ('remote_config', (string) get_parameter ('remote_config')); config_update_value ('loginhash_pwd', (string) get_parameter ('loginhash_pwd')); config_update_value ('timesource', (string) get_parameter ('timesource')); diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 8bc3791682..eb1d625831 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1414,6 +1414,10 @@ function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false) { global $config; + $hack_metaconsole = ''; + if (defined('METACONSOLE')) + $hack_metaconsole = '../../'; + $out_of_lim_str = __("Out of limits"); $title = ""; @@ -1431,7 +1435,7 @@ function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $va include_graphs_dependencies($config['homedir'].'/'); return "