From 8fb71f8413c6ade523d84e0009c7eb451e7f695e Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 5 Aug 2015 10:38:32 +0200 Subject: [PATCH] Fixes and improvements in the use of agents and monitors multiselects --- .../visual_console_builder.wizard.php | 41 ++++++++----- pandora_console/include/javascript/pandora.js | 61 +++++++++---------- .../operation/agentes/ver_agente.php | 11 +++- 3 files changed, 63 insertions(+), 50 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.wizard.php b/pandora_console/godmode/reporting/visual_console_builder.wizard.php index fb75d21d4e..00344e0a6f 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.wizard.php +++ b/pandora_console/godmode/reporting/visual_console_builder.wizard.php @@ -50,7 +50,7 @@ require_once($config['homedir'] . "/include/functions_agents.php"); $table->id = 'wizard_table'; $table->head = array (); -if (!defined('METACONSOLE')) { +if (!is_metaconsole()) { $metaconsole_hack = ''; $table->width = '100%'; $table->class = 'databox filters'; @@ -188,16 +188,17 @@ $table->data["percentileitem_4"][1] = html_print_radio_button_extended( 'value', false, '', 'style="float: left;"', true); -if (defined('METACONSOLE')) { +if (is_metaconsole()) { $table->rowstyle["all_2"] = 'display: none;'; $table->data["all_2"][0] = __('Servers'); if ($strict_user) - $table->data["all_2"][1] = html_print_select('','server_id', - $server_id, 'metaconsole_init();', __('All'), '0', true); + $table->data["all_2"][1] = html_print_select('','servers', + '', 'metaconsole_init();', __('All'), '0', true); else + $sql = 'SELECT id, server_name + FROM tmetaconsole_setup'; $table->data["all_2"][1] = html_print_select_from_sql( - 'SELECT id, server_name FROM tmetaconsole_setup', - 'server_id', $server_id, 'metaconsole_init();', __('All'), + $sql, 'servers', '', 'metaconsole_init();', __('All'), '0', true); } @@ -229,7 +230,7 @@ $table->rowstyle["all_4"] = 'display: none;'; $table->data["all_4"][0] = __('Agents'); $agents_list = array(); -if (!defined('METACONSOLE')) +if (!is_metaconsole()) $agents_list = agents_get_group_agents(0, false, "none", false, true); @@ -282,7 +283,7 @@ $table->data["all_8"][3] = '' . -if (defined('METACONSOLE')) { +if (is_metaconsole()) { $pure = get_parameter('pure', 0); echo '
'; -if (defined('METACONSOLE')) { +if (is_metaconsole()) { html_print_input_hidden ('action2', 'update'); } else { @@ -324,7 +325,7 @@ echo '