2012-10-02 Dario Rodriguez <dario.rodriguez@artica.es>
* include/functions_graph.php, operation/agentes/stat_win.php: Fixed a problem with max and min in boolean graph. This graphs don't have max and min series. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7031 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
88d09cb3c4
commit
6c6a3fb0ec
|
@ -1,3 +1,10 @@
|
|||
2012-10-02 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* include/functions_graph.php,
|
||||
operation/agentes/stat_win.php: Fixed a problem with
|
||||
max and min in boolean graph. This graphs don't have
|
||||
max and min series.
|
||||
|
||||
2012-10-02 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* include/styles/pandora.css: Fixed a wrong change
|
||||
|
|
|
@ -2427,9 +2427,10 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||
|
||||
//The order filling the array is very important to get the same colors
|
||||
//in legends and graphs!!!
|
||||
if (!$avg_only) {
|
||||
//Boolean graph doesn't have max!!!
|
||||
/*if (!$avg_only) {
|
||||
$chart[$timestamp]['max'.$series_suffix] = 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Data and zeroes (draw a step)
|
||||
if ($zero == 1 && $count > 0) {
|
||||
|
@ -2466,9 +2467,11 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||
}
|
||||
}
|
||||
|
||||
if (!$avg_only) {
|
||||
|
||||
//Boolean graph doesn't have min!!!
|
||||
/*if (!$avg_only) {
|
||||
$chart[$timestamp]['min'.$series_suffix] = 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
if(!empty($event_ids)) {
|
||||
$chart_extra_data[count($chart)-1]['events'] = implode(',',$event_ids);
|
||||
|
@ -2538,9 +2541,11 @@ function grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
|||
}
|
||||
|
||||
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;
|
||||
//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['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;
|
||||
//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;
|
||||
|
||||
|
@ -2608,7 +2613,7 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
|
|||
}
|
||||
grafico_modulo_boolean_data ($agent_module_id, $period, $show_events,
|
||||
$unit_name, $show_alerts, $avg_only, $date, '', '', $show_unknown);
|
||||
|
||||
|
||||
if ($compare === 'overlapped') {
|
||||
$i = 0;
|
||||
foreach($chart as $k=>$v) {
|
||||
|
|
|
@ -315,15 +315,19 @@ $label = base64_decode(get_parameter('label', ''));
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo __('Avg. Only'); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
html_print_checkbox ("avg_only", 1, (bool) $avg_only, false, false, 'show_others()');
|
||||
html_print_input_hidden('show_other', 0);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($graph_type != "boolean") {
|
||||
echo '<tr>
|
||||
<td>'.
|
||||
__('Avg. Only').
|
||||
'</td>
|
||||
<td>';
|
||||
html_print_checkbox ("avg_only", 1, (bool) $avg_only, false, false, 'show_others()');
|
||||
html_print_input_hidden('show_other', 0);
|
||||
echo '</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo __('Begin date'); ?></td>
|
||||
<td>
|
||||
|
|
Loading…
Reference in New Issue