2013-03-11 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php: change the text of legends of "Data" for "Avg". Fixes: #3607218 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7832 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6e5709064a
commit
9ccd44b3fe
|
@ -1,3 +1,10 @@
|
|||
2013-03-11 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_graph.php: change the text of legends of "Data"
|
||||
for "Avg".
|
||||
|
||||
Fixes: #3607218
|
||||
|
||||
2013-03-11 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_groups.php
|
||||
|
|
|
@ -671,13 +671,13 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
|||
$chart_extra_data['legend_unknown'] = $legend['unknown'.$series_suffix_str];
|
||||
}
|
||||
|
||||
if (!$avg_only){
|
||||
if (!$avg_only) {
|
||||
$legend['max'.$series_suffix] = __('Max').$series_suffix_str.': '.__('Last').': '.$graph_stats['max']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['max']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['max']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['max']['min'].' '.$unit;
|
||||
$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;
|
||||
$legend['sum'.$series_suffix] = __('Avg').$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;
|
||||
$legend['min'.$series_suffix] = __('Min').$series_suffix_str.': '.__('Last').': '.$graph_stats['min']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['min']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['min']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['min']['min'].' '.$unit;
|
||||
}
|
||||
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;
|
||||
$legend['sum'.$series_suffix] = __('Avg').$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;
|
||||
//Baseline was replaced by compare graph feature
|
||||
/*if ($baseline) {
|
||||
$legend['baseline'.$series_suffix] = __('Baseline');
|
||||
|
@ -2808,13 +2808,13 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||
if (!$avg_only) {
|
||||
//Boolean graph doesn't have max!!!
|
||||
//$legend['max'.$series_suffix] = __('Max').$series_suffix_str .': '.__('Last').': '.$graph_stats['max']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['max']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['max']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['max']['min'].' '.$unit;
|
||||
$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;
|
||||
$legend['sum'.$series_suffix] = __('Avg').$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;
|
||||
//Boolean graph doesn't have min!!!
|
||||
//$legend['min'.$series_suffix] = __('Min').$series_suffix_str .': '.__('Last').': '.$graph_stats['min']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['min']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['min']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['min']['min'].' '.$unit;
|
||||
}
|
||||
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;
|
||||
|
||||
$legend['sum'.$series_suffix] = __('Avg').$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;
|
||||
|
||||
}
|
||||
//$legend['baseline'.$series_suffix] = __('Baseline').$series_suffix_str;
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -3349,7 +3349,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||
}
|
||||
|
||||
$legend['max'] = __('Max').': '.__('Last').': '.$graph_stats['max']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['max']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['max']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['max']['min'].' '.$unit;
|
||||
$legend['sum'] = __('Data').': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
||||
$legend['sum'] = __('Avg').': '.__('Last').': '.$graph_stats['sum']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['sum']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['sum']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['sum']['min'].' '.$unit;
|
||||
$legend['min'] = __('Min').': '.__('Last').': '.$graph_stats['min']['last'].' '.$unit.' ; '.__('Avg').': '.$graph_stats['min']['avg'].' '.$unit.' ; '.__('Max').': '.$graph_stats['min']['max'].' '.$unit.' ; '.__('Min').': '.$graph_stats['min']['min'].' '.$unit;
|
||||
|
||||
|
||||
|
@ -3420,18 +3420,19 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu
|
|||
}
|
||||
|
||||
$top = $datelimit + ($periodtime * ($i + 1));
|
||||
|
||||
|
||||
$events = db_get_all_rows_filter ('tevento',
|
||||
array ('id_agentmodule' => $id_module,
|
||||
'utimestamp > '.$bottom,
|
||||
'utimestamp < '.$top), 'event_type, utimestamp');
|
||||
|
||||
array ('id_agentmodule' => $id_module,
|
||||
'utimestamp > '.$bottom,
|
||||
'utimestamp < '.$top),
|
||||
'event_type, utimestamp');
|
||||
|
||||
$status = 'normal';
|
||||
foreach($events as $event) {
|
||||
if(empty($event['utimestamp'])) {
|
||||
if (empty($event['utimestamp'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
switch($event['event_type']) {
|
||||
case 'going_down_normal':
|
||||
case 'going_up_normal':
|
||||
|
@ -3454,10 +3455,10 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$data[$cont]['utimestamp'] = $periodtime;
|
||||
|
||||
if (!empty($events)){
|
||||
if (!empty($events)) {
|
||||
switch ($status) {
|
||||
case 'warning':
|
||||
$data[$cont]['data'] = 2;
|
||||
|
@ -3473,7 +3474,7 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu
|
|||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$data[$cont]['data'] = 1;
|
||||
$current_timestamp = $bottom;
|
||||
}
|
||||
|
@ -3492,7 +3493,7 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu
|
|||
$xdata_display = $max_xdata_display;
|
||||
}
|
||||
|
||||
$step = round($ndata/$xdata_display);
|
||||
$step = round($ndata/$xdata_display);
|
||||
|
||||
$colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3');
|
||||
|
||||
|
|
Loading…
Reference in New Issue