From 2b6c15d0b17237c4433dc4715da05c3d9c2cf522 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 18 Apr 2011 16:07:20 +0000 Subject: [PATCH] 2011-04-18 Miguel de Dios * include/functions_graph.php, godmode/reporting/graph_builder.preview.php: fixes for the new graph engine. * operation/agentes/estado_monitores.php: added a toggle button to show the the entire value or sub string for value (by default). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4240 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++ .../reporting/graph_builder.preview.php | 2 ++ pandora_console/include/functions_graph.php | 2 ++ .../operation/agentes/estado_monitores.php | 25 ++++++++++++++++++- 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8b54505651..00ad23d715 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-04-18 Miguel de Dios + + * include/functions_graph.php, godmode/reporting/graph_builder.preview.php: + fixes for the new graph engine. + + * operation/agentes/estado_monitores.php: added a toggle button to show the + the entire value or sub string for value (by default). + 2011-04-18 Miguel de Dios * include/functions_graph.php, include/graphs/functions_fsgraph.php, diff --git a/pandora_console/godmode/reporting/graph_builder.preview.php b/pandora_console/godmode/reporting/graph_builder.preview.php index 144b24b0d7..467ca6f3cb 100644 --- a/pandora_console/godmode/reporting/graph_builder.preview.php +++ b/pandora_console/godmode/reporting/graph_builder.preview.php @@ -139,6 +139,8 @@ echo ""; if(!empty($modules)) { require_once ($config["homedir"] . '/include/functions_graph.php'); + + echo graphic_combined_module2(explode (',', $modules), explode (',', $weights), $period, $width, $height, 'Combined%20Sample%20Graph', '', $events, 0, 0, $stacked, $unixdate); } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 6874a33185..bb55a1f4c5 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -327,6 +327,8 @@ function graphic_combined_module2 ($module_list, $weight_list, $period, $width, global $config; global $graphic_type; + include_flash_chart_script(); + // Set the title and time format if ($period <= 3600) { diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index 4754efa5b4..cc0605dfdb 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -323,7 +323,18 @@ foreach ($modules as $module) { $salida = format_numeric($module["datos"]); } else { - $salida = "".substr(safe_output($module["datos"]),0,12).""; + $module_value = safe_output($module["datos"]); + $sub_string = substr(safe_output($module["datos"]),0, 12); + + if ($module_value == $sub_string) { + $salida = $module_value; + } + else { + $salida = "" . + '' . $sub_string . ' ' . + "" . print_image("images/rosette.png", true) . "" . ""; + } } } @@ -357,6 +368,18 @@ foreach ($modules as $module) { $rowIndex++; } +?> + +data)) { echo '
'.__('This agent doesn\'t have any active monitors').'
'; }