2012-10-03 Dario Rodriguez <dario.rodriguez@artica.es>

* 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
This commit is contained in:
darode 2012-10-03 11:07:21 +00:00
parent 44a8064360
commit 735c6950b7
3 changed files with 17 additions and 18 deletions

View File

@ -1,3 +1,9 @@
2012-10-03 Dario Rodriguez <dario.rodriguez@artica.es>
* include/functions_graph.php,
operation/agentes/stat_win.php: Replaced baseline
graph by compare graph feature.
2012-10-03 Junichi Satoh <junichi@rworks.jp>
* godmode/setup/setup.php: Fixed a typo.

View File

@ -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,

View File

@ -376,16 +376,6 @@ $label = base64_decode(get_parameter('label', ''));
?>
</td>
</tr>
<?php
if ($config['enterprise_installed'] && $graph_type == "sparse") {
echo '<tr>';
echo '<td>' . __('Draw baseline') . '</td>';
echo '<td>';
html_print_checkbox ("baseline", 1, (bool) $baseline);
echo '</td>';
echo '</tr>';
}
?>
<tr>
<td><?php echo __('Show event graph');?></td>
<td>