From 4b5b7c0db833c9697ccef43c967e760e212186b5 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 12 Dec 2012 13:51:45 +0000 Subject: [PATCH] 2012-12-12 Miguel de Dios * include/functions_visual_map_editor.php: increased the size of agent autocomplete widget. * include/functions_visual_map.php: in the function "visual_map_print_visual_map" changed for to print corretly the urls in public view in metaconsole. * include/ajax/agent.php: restore the search for any string in the autocomplete agent. * operation/reporting/reporting_xml.php, operation/search_results.php, operation/visual_console/public_console.php, godmode/setup/setup_auth.php, godmode/servers/modificar_server.php: cleaned source code style. * godmode/reporting/visual_console_builder.editor.js: fixed when finish a resize action or put the grid, before these actions was make a corrupt data of items. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7269 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 22 +++++ .../visual_console_builder.editor.js | 10 +- .../godmode/servers/modificar_server.php | 39 ++++---- pandora_console/godmode/setup/setup_auth.php | 8 +- pandora_console/include/ajax/agent.php | 4 +- .../include/functions_visual_map.php | 18 ++-- .../include/functions_visual_map_editor.php | 4 +- .../operation/reporting/reporting_xml.php | 95 +++++++++++-------- pandora_console/operation/search_results.php | 28 +++--- .../visual_console/public_console.php | 2 +- 10 files changed, 134 insertions(+), 96 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d9beb129cb..029fb8035c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,25 @@ +2012-12-12 Miguel de Dios + + * include/functions_visual_map_editor.php: increased the size of + agent autocomplete widget. + + * include/functions_visual_map.php: in the function + "visual_map_print_visual_map" changed for to print corretly the + urls in public view in metaconsole. + + * include/ajax/agent.php: restore the search for any string in + the autocomplete agent. + + * operation/reporting/reporting_xml.php, + operation/search_results.php, + operation/visual_console/public_console.php, + godmode/setup/setup_auth.php, godmode/servers/modificar_server.php: + cleaned source code style. + + * godmode/reporting/visual_console_builder.editor.js: fixed when + finish a resize action or put the grid, before these actions + was make a corrupt data of items. + 2012-12-12 Ramon Novoa * pandoradb_data.sql, diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index ddcf33b245..7148de2b3f 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -1199,7 +1199,8 @@ function updateDB_visual(type, idElement , values, event, top, left) { case 'module_graph': $("#image_" + idElement).attr("src", getModuleGraph(idElement)); case 'static_graph': - if (event != 'dragstop') { + if ((event != 'resizestop') && (event != 'show_grid') + && (event != 'dragstop')) { var element_status= null; var parameter = Array(); parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); @@ -1336,6 +1337,7 @@ function updateDB(type, idElement , values, event) { //Check if the event parameter in function is passed in the call. if (event != null) { switch (event) { + case 'show_grid': case 'resizestop': //Force to move action when resize a background, for to avoid //lost the label. @@ -1626,7 +1628,7 @@ function eventsBackground() { values['width'] = $('#background').css('width').replace('px', ''); values['height'] = $('#background').css('height').replace('px', ''); - updateDB('background', 0, values); + updateDB('background', 0, values, 'resizestop'); width = ui.size['width']; height = ui.size['height']; @@ -1687,7 +1689,7 @@ function move_elements_resize(original_width, original_height, width, height) { values['absolute_left'] = new_width; values['absolute_top'] = new_height; - updateDB(classItem, idItem, values); + updateDB(classItem, idItem, values, "resizestop"); }); } @@ -1928,7 +1930,7 @@ function showGrid() { values['absolute_left'] = pos_x; values['absolute_top'] = pos_y; - updateDB(classItem, idItem, values); + updateDB(classItem, idItem, values, 'show_grid'); }); eventsItems([SIZE_GRID, SIZE_GRID]); diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index 209c5c0f20..efdf2bf5f2 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -45,8 +45,8 @@ if (isset($_GET["server"])) { $table->data[] = array (__('IP Address'),html_print_input_text ('address',$row["ip_address"],'',50,0,true)); $table->data[] = array (__('Description'),html_print_input_text ('description',$row["description"],'',50,0,true)); html_print_table ($table); - - + + echo '
'; echo ''; echo "
"; @@ -83,24 +83,24 @@ else { } } - - + + $servers = servers_get_info (); if ($servers === false) { echo "
".__('There are no servers configured into the database')."
"; return; } - + $table->width = '98%'; $table->size = array (); - + $table->style = array (); $table->style[0] = 'font-weight: bold'; - + $table->align = array (); $table->align[1] = 'center'; $table->align[8] = 'center'; - + $table->head = array (); $table->head[0] = __('Name'); $table->head[1] = __('Status'); @@ -111,15 +111,15 @@ else { $table->head[6] = __('T/Q') . ui_print_help_tip (__("Threads / Queued modules currently"), true); // This will have a column of data such as "6 hours" $table->head[7] = __('Updated'); - + //Only Pandora Administrator can delete servers if (check_acl ($config["id_user"], 0, "PM")) { $table->head[8] = '' . __('Op.') . ''; } - + $table->data = array (); - - + + foreach ($servers as $server) { $data = array (); @@ -156,10 +156,10 @@ else { $data[5] = ''.$server["lag_txt"].''; break; } - + $data[6] = $server['threads'].' : '.$server['queued_modules']; $data[7] = ui_print_timestamp ($server['keepalive'], true); - + //Only Pandora Administrator can delete servers if (check_acl ($config["id_user"], 0, "PM")) { $data[8] = ''; @@ -169,15 +169,15 @@ else { $data[8] .= '  '; $data[8] .= html_print_image ('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" . __('Modules run by this server will stop working. Do you want to continue?') ."')) return false")); $data[8] .= ''; - } + } array_push ($table->data, $data); } - + html_print_table ($table); - + //Legend - + echo ""; echo ""; echo ""; @@ -196,5 +196,4 @@ else { echo ''; echo "
" . __('Legend') . "
'.__('Prediction server').'
"; } - -?> +?> \ No newline at end of file diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index 70ebc6c106..7ff1cffcea 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -49,7 +49,7 @@ $table->data[2][0] = __('Autocreate profile'); $profile_list = profile_get_profiles (); if ($profile_list === false) { $profile_list = array (); -} +} $table->data[2][1] = html_print_select ($profile_list, 'default_remote_profile', $config['default_remote_profile'], '', '', '', true, false, true, '', $config['autocreate_remote_users'] == 0); $table->data[3][0] = __('Autocreate profile group'); $table->data[3][1] = html_print_select_groups ($config['id_user'], "AR", true, 'default_remote_group', $config['default_remote_group'], '', '', '', true, false, true, '', $config['autocreate_remote_users'] == 0); @@ -96,7 +96,7 @@ echo '';