diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a534578eb2..7b1f1d312a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2013-04-10 Miguel de Dios + + * include/functions_visual_map_editor.php, + include/ajax/visual_console_builder.ajax.php, + godmode/reporting/visual_console_builder.php, + godmode/reporting/visual_console_builder.data.php, + godmode/reporting/visual_console_builder.editor.js: some fixes in + the visualconsole. + 2013-04-10 Miguel de Dios * include/ajax/visual_console_builder.ajax.php: fixed the name of diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php index 2d4d2d6907..bc3f61512a 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.data.php +++ b/pandora_console/godmode/reporting/visual_console_builder.data.php @@ -81,7 +81,7 @@ $own_info = get_user_info($config['id_user']); // Only display group "All" if user is administrator or has "PM" privileges if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) $display_all_group = true; -else +else $display_all_group = false; $table->data[1][1] = html_print_select_groups($config['id_user'], "RW", $display_all_group, 'id_group', $idGroup, '', '', '', true); diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index fbf1bab6dc..9519a232b5 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -219,6 +219,7 @@ function readFields() { values['metaconsole'] = 1; values['id_agent'] = $("#hidden-agent").val(); values['server_name'] = $("#id_server_name").val(); + values['server_id'] = $("input[name='id_server_metaconsole']").val(); } else { values['metaconsole'] = 0; @@ -1511,13 +1512,6 @@ function eventsItems(drag) { $('.item').unbind('dragstop'); $('.item').unbind('dragstart'); - //Check if exist or create the previous draggable - check_draggable = $(".item").data(); - if (check_draggable) { - if (typeof(check_draggable.uiDraggable) != "undefined") - $(".item").draggable('destroy'); - } - //$(".item").resizable(); //Disable but run in ff and in the waste (aka micro$oft IE) show ungly borders $('.item').bind('click', function(event, ui) { diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index b4e74ddc61..f5ca36d0b9 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -401,6 +401,8 @@ else { $url_view = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap=' . $idVisualConsole . '&refr=' . $view_refresh; } + + $buttons = array( 'view' => array('active' => false, 'text' => '' . @@ -453,4 +455,4 @@ switch ($activeTab) { require_once($config['homedir'] . '/godmode/reporting/visual_console_builder.editor.php'); break; } -?> +?> \ No newline at end of file diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index f524536422..7664e8f1ef 100644 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -65,6 +65,7 @@ $type_percentile = get_parameter('type_percentile', 'percentile'); $value_show = get_parameter('value_show', 'percent'); $metaconsole = get_parameter('metaconsole', 0); $server_name = get_parameter('server_name', null); +$server_id = (int)get_parameter('server_id', 0); $id_agent = get_parameter('id_agent', null); $id_metaconsole = get_parameter('id_metaconsole', null); @@ -333,6 +334,10 @@ switch ($action) { $values['id_metaconsole'] = db_get_value('id', 'tmetaconsole_setup', 'server_name', $server_name); } + if ($server_id > 0) { + $values['id_metaconsole'] = $server_id; + } + if ($id_agent !== null) { $values['id_agent'] = $id_agent; @@ -546,8 +551,13 @@ switch ($action) { $values['pos_y'] = $top; if (defined('METACONSOLE') && $metaconsole) { - $values['id_metaconsole'] = db_get_value('id', - 'tmetaconsole_setup', 'server_name', $server_name); + if ($server_id > 0) { + $values['id_metaconsole'] = $server_id; + } + else { + $values['id_metaconsole'] = db_get_value('id', + 'tmetaconsole_setup', 'server_name', $server_name); + } $values['id_agent'] = $id_agent; } else { diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 63039e7010..7692a46af9 100644 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -132,8 +132,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $params['disabled_javascript_on_blur_function'] = true; $params['print_input_server'] = true; + $params['print_input_id_server'] = true; $params['input_server_id'] = 'id_server_name'; + $params['input_id_server_name'] = 'id_server_metaconsole'; $params['input_server_value'] = ''; + $params['use_input_id_server'] = true; $params['metaconsole_enabled'] = true; $params['print_hidden_input_idagent'] = true; } @@ -402,4 +405,4 @@ function visual_map_editor_print_hack_translate_strings() { echo ''; echo ''; } -?> +?> \ No newline at end of file