diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 73e5562349..e33aea815f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2014-03-06 Miguel de Dios + + * include/functions_visual_map.php, + operation/visual_console/render_view.php: cleaned source code style. + + * include/functions_reporting.php: fixed the legend for the graphs + into the topn element report. + + Incident: #597 + 2014-03-06 Miguel de Dios * operation/agentes/snapshot_view.php: fixed the lost scrollbars. diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 4d3b5f34d5..8645c137b6 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5100,6 +5100,33 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f ' - ' . ui_print_truncate_text($module_name[$i], $truncate_size, false, true, false, "..."); + + + //Dirty hack, maybe I am going to apply a job in Apple + //https://www.imperialviolet.org/2014/02/22/applebug.html + $item_name_key_pie = $item_name; + $exist_key = true; + while ($exist_key) { + if (isset($data_pie_graph[$item_name_key_pie])) { + $item_name_key_pie .= ' '; + } + else { + $exist_key = false; + } + } + $item_name_key_hbar = $item_name; + $exist_key = true; + while ($exist_key) { + if (isset($data_hbar[$item_name_key_hbar])) { + $item_name_key_hbar = ' ' . $item_name_key_hbar; + } + else { + $exist_key = false; + } + } + + + $data_hbar[$item_name]['g'] = $dt; $data_pie_graph[$item_name] = $dt; @@ -5122,9 +5149,38 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f foreach ($agent_name as $an) { $item_name = ''; $item_name = - ui_print_truncate_text($agent_name[$i], $truncate_size, false, true, false, "...") . + ui_print_truncate_text($agent_name[$i], + $truncate_size, false, true, false, "...") . ' - ' . - ui_print_truncate_text($module_name[$i], $truncate_size, false, true, false, "..."); + ui_print_truncate_text($module_name[$i], + $truncate_size, false, true, false, "..."); + + + + //Dirty hack, maybe I am going to apply a job in Apple + //https://www.imperialviolet.org/2014/02/22/applebug.html + $item_name_key_pie = $item_name; + $exist_key = true; + while ($exist_key) { + if (isset($data_pie_graph[$item_name_key_pie])) { + $item_name_key_pie .= ' '; + } + else { + $exist_key = false; + } + } + $item_name_key_hbar = $item_name; + $exist_key = true; + while ($exist_key) { + if (isset($data_hbar[$item_name_key_hbar])) { + $item_name_key_hbar = ' ' . $item_name_key_hbar; + } + else { + $exist_key = false; + } + } + + $data_pie_graph[$item_name] = $data_top[$i]; $data_hbar[$item_name]['g'] = $data_top[$i]; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index dadc9e1e4e..1bf326164e 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1014,11 +1014,12 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line $layout_data_parent = db_get_row_filter('tlayout_data', array('id' => $layout_data["parent_item"])); - $status_parent = visual_map_get_status_element($layout_data_parent); + $status_parent = + visual_map_get_status_element($layout_data_parent); $line['id'] = $layout_data['id']; - $line['node_begin'] = 'layout-data-'.$layout_data["parent_item"]; - $line['node_end'] = 'layout-data-'.$layout_data["id"]; + $line['node_begin'] = 'layout-data-' . $layout_data["parent_item"]; + $line['node_end'] = 'layout-data-' . $layout_data["id"]; switch ($status_parent) { default: case VISUAL_MAP_STATUS_UNKNOWN: @@ -1038,8 +1039,6 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line array_push ($lines, $line); } - - // ************************************************************* // Get STATUS of current object // ************************************************************* diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 5b292429e8..2cd7a780ef 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -183,20 +183,19 @@ if ($config["pure"]) { ?> t = new Date(); t.setTime (t.getTime() + ); - $("#countdown").countdown( - { + $("#countdown").countdown({ until: t, format: 'MS', description: '', onExpiry: function () { - href = ""; - href = href + "&refr="; - $(document).attr ("location", href); - } + href = ""; + href = href + "&refr="; + $(document).attr ("location", href); + } } );