From 735c6950b71f25a5ad101aef8699fdc016e91c4b Mon Sep 17 00:00:00 2001 From: darode Date: Wed, 3 Oct 2012 11:07:21 +0000 Subject: [PATCH] 2012-10-03 Dario Rodriguez * include/functions_graph.php, operation/agentes/stat_win.php: Replaced baseline graph by compare graph feature. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7033 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_graph.php | 19 +++++++++++-------- .../operation/agentes/stat_win.php | 10 ---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 396744ccd2..4f554a4a2f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-10-03 Dario Rodriguez + + * include/functions_graph.php, + operation/agentes/stat_win.php: Replaced baseline + graph by compare graph feature. + 2012-10-03 Junichi Satoh * godmode/setup/setup.php: Fixed a typo. diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 0fda778d51..c0868840ba 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -412,12 +412,13 @@ function grafico_modulo_sparse_data_chart (&$chart, &$chart_data_extra, &$long_i //$chart[$timestamp]['timestamp_top'] = $timestamp + $interval; ///////// - if ($baseline) { + //Baseline was replaced by compare graphs feature + /*if ($baseline) { $chart[$timestamp]['baseline'.$series_suffix] = array_shift ($baseline_data); if ($chart[$timestamp]['baseline'.$series_suffix] == NULL) { $chart[$timestamp]['baseline'.$series_suffix] = 0; } - } + }*/ if(!empty($event_ids)) { $chart_extra_data[count($chart)-1]['events'] = implode(',',$event_ids); @@ -568,8 +569,9 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, } // Get baseline data + //Baseline was replaced by compare graph feature $baseline_data = array(); - if ($baseline) { + /*if ($baseline) { $baseline_data = array (); if ($baseline == 1) { $baseline_data = enterprise_hook ('reporting_enterprise_get_baseline', array ($agent_module_id, $period, $width, $height , $title, $unit_name, $date)); @@ -577,7 +579,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, $baseline_data = array (); } } - } + }*/ if (empty($unit)){ $unit = modules_get_unit($agent_module_id); @@ -632,7 +634,8 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, $color['max'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50); $color['sum'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50); $color['min'.$series_suffix] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50); - $color['baseline'.$series_suffix] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10); + //Baseline was replaced by compare graph feature + //$color['baseline'.$series_suffix] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10); $color['unit'.$series_suffix] = array('border' => null, 'color' => '#0097BC', 'alpha' => 10); if($show_events) { @@ -655,10 +658,10 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, } else $legend['sum'.$series_suffix] = __('Data').$series_suffix_str.': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit; - if ($baseline) { + //Baseline was replaced by compare graph feature + /*if ($baseline) { $legend['baseline'.$series_suffix] = __('Baseline'); - } - + }*/ } function grafico_modulo_sparse ($agent_module_id, $period, $show_events, diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 2b24a18987..8e9bd7db4d 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -376,16 +376,6 @@ $label = base64_decode(get_parameter('label', '')); ?> - '; - echo '' . __('Draw baseline') . ''; - echo ''; - html_print_checkbox ("baseline", 1, (bool) $baseline); - echo ''; - echo ''; - } - ?>