From 529f0e0640f1eec0557ada292d5c7322590a77c2 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Thu, 8 Sep 2011 15:55:06 +0000 Subject: [PATCH] 2011-09-08 Juan Manuel Ramon * godmode/setup/performance.php godmode/setup/setup_visuals.php: Added contextual help in this views. * include/functions_reporting.php: Now serialized reports get numeric data. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4930 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/godmode/setup/performance.php | 4 ++-- .../godmode/setup/setup_visuals.php | 2 +- .../include/functions_reporting.php | 18 +++++++++++++----- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8f9d1b6890..6061b3fbff 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-09-08 Juan Manuel Ramon + + * godmode/setup/performance.php + godmode/setup/setup_visuals.php: Added contextual help in this views. + * include/functions_reporting.php: Now serialized reports get numeric data. + 2011-09-07 Juan Manuel Ramon * godmode/setup/setup.php: Url and Integria password are checked and diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index 8d93e73044..0b090c752f 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -67,7 +67,7 @@ $table->data[7][1] = html_print_input_text ('days_compact', $config["days_compac $table->data[8][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table->data[8][1] = html_print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true); -$table->data[9][0] = __('SLA period (seconds)'); +$table->data[9][0] = __('SLA period (seconds)') . ui_print_help_tip(__('You can see this in SLA agent tab.'), true);; $table->data[9][1] = html_print_input_text ('sla_period', $config["sla_period"], '', 8, 8, true); $table->data[10][0] = __('Default hours for event view'); @@ -81,7 +81,7 @@ $table->data[12][0] = __('Use realtime statistics'); $table->data[12][1] = __('Yes').' '.html_print_radio_button ('realtimestats', 1, '', $config["realtimestats"], true).'  '; $table->data[12][1] .= __('No').' '.html_print_radio_button ('realtimestats', 0, '', $config["realtimestats"], true); -$table->data[13][0] = __('Batch statistics period (secs)'); +$table->data[13][0] = __('Batch statistics period (secs)') . ui_print_help_tip(__('If realtime statistics are disabled, statistics interval resfresh will be set here.'), true); $table->data[13][1] = html_print_input_text ('stats_interval', $config["stats_interval"], '', 5, 5, true); $table->data[14][0] = __('Use agent access graph') . ui_print_help_icon("agent_access", true); diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index ae6fce45a6..307a416037 100644 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -85,7 +85,7 @@ $table->data[10][1] = html_print_select($fonts, 'fontpath', $config["fontpath"], $table->data[11][0] = __('Font size'); $table->data[11][1] = html_print_select(range(1, 15), 'font_size', $config["font_size"], '', '', 0, true); -$table->data[12][0] = __('Flash charts'); +$table->data[12][0] = __('Flash charts') . ui_print_help_tip(__('Whether to use Flash charts or static PNG graphs'), true); $table->data[12][1] = __('Yes').' '.html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).'  '; $table->data[12][1] .= __('No').' '.html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index c926fb0e01..a6d581043c 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2719,12 +2719,20 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f array_unshift($table2->head, __('Date')); $datelimit = $report["datetime"] - $content['period']; - + $result = db_get_all_rows_sql('SELECT * - FROM tagente_datos_string - WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' - AND utimestamp > ' . $datelimit . ' - AND utimestamp <= ' . $report["datetime"]); + FROM tagente_datos + WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' + AND utimestamp > ' . $datelimit . ' + AND utimestamp <= ' . $report["datetime"]); + // Adds string data if there is no numeric data + if ((count($result) >= 0) or (!$result)){ + $result = db_get_all_rows_sql('SELECT * + FROM tagente_datos_string + WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' + AND utimestamp > ' . $datelimit . ' + AND utimestamp <= ' . $report["datetime"]); + } if ($result === false) { $result = array(); }