2012-03-07 Sergio Martin <sergio.martin@artica.es>
* include/functions_graph.php include/graphs/flot/pandora.flot.js operation/agentes/stat_win.php: Fixed several sparse graph bugs and stabilize code with new jquery system of miguel work git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5711 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
766c828043
commit
5c09c910e6
|
@ -1,3 +1,11 @@
|
|||
2012-03-07 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_graph.php
|
||||
include/graphs/flot/pandora.flot.js
|
||||
operation/agentes/stat_win.php: Fixed several sparse
|
||||
graph bugs and stabilize code with new jquery system
|
||||
of miguel work
|
||||
|
||||
2012-03-07 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/graphs/functions_flot.php
|
||||
|
|
|
@ -157,7 +157,8 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
}
|
||||
|
||||
$chart_extra_data = array();
|
||||
|
||||
$series_type = array();
|
||||
|
||||
// Calculate chart data
|
||||
for ($i = 0; $i < $resolution; $i++) {
|
||||
$timestamp = $datelimit + ($interval * $i);
|
||||
|
@ -251,14 +252,22 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
if (!$projection){
|
||||
$timestamp = $timestamp_short;
|
||||
}
|
||||
// Data
|
||||
|
||||
// Data
|
||||
if($show_events) {
|
||||
$chart[$timestamp]['event'] = $event_value;
|
||||
$series_type['event'] = 'points';
|
||||
}
|
||||
if($show_alerts) {
|
||||
$chart[$timestamp]['alert'] = $alert_value;
|
||||
$series_type['alert'] = 'points';
|
||||
}
|
||||
|
||||
if ($count > 0) {
|
||||
if ($avg_only) {
|
||||
$chart[$timestamp]['sum'] = $total;
|
||||
}
|
||||
else {
|
||||
//$chart[$timestamp]['utimestamp'] = $timestamp;
|
||||
//$chart[$timestamp]['datos'] = $total;
|
||||
$chart[$timestamp]['max'] = $interval_max;
|
||||
$chart[$timestamp]['sum'] = $total;
|
||||
$chart[$timestamp]['min'] = $interval_min;
|
||||
|
@ -294,16 +303,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
|
|||
//$chart[$timestamp]['timestamp_bottom'] = $timestamp;
|
||||
//$chart[$timestamp]['timestamp_top'] = $timestamp + $interval;
|
||||
/////////
|
||||
$series_type = array();
|
||||
|
||||
if($show_events) {
|
||||
$chart[$timestamp]['event'] = $event_value;
|
||||
$series_type['event'] = 'points';
|
||||
}
|
||||
if($show_alerts) {
|
||||
$chart[$timestamp]['alert'] = $alert_value;
|
||||
$series_type['alert'] = 'points';
|
||||
}
|
||||
|
||||
if ($baseline) {
|
||||
$chart[$timestamp]['baseline'] = array_shift ($baseline_data);
|
||||
if ($chart[$timestamp]['baseline'] == NULL) {
|
||||
|
|
|
@ -766,7 +766,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||
|
||||
$('#'+graph_id).bind("plotclick", function (event, pos, item) {
|
||||
plot.unhighlight();
|
||||
if (item && item.series.label != '') {
|
||||
if (item && item.series.label != '' && (item.series.label == legend_events || item.series.label == legend_alerts)) {
|
||||
plot.unhighlight();
|
||||
var canvaslimit = parseInt(plot.offset().left + plot.width());
|
||||
var dataset = plot.getData();
|
||||
|
@ -801,7 +801,6 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||
break;
|
||||
}
|
||||
|
||||
extra_info = get_event_details(eventsz[item.dataIndex]);
|
||||
if(extra_show) {
|
||||
$('#extra_'+graph_id).html(extra_info);
|
||||
$('#extra_'+graph_id).css('display','');
|
||||
|
|
|
@ -54,7 +54,7 @@ if ($refresh > 0) {
|
|||
<script type='text/javascript' src='../../include/javascript/x_core.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/x_event.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/x_slide.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery-1.7.1.min.js'></script>
|
||||
<script type='text/javascript'><!--
|
||||
var defOffset = 2;
|
||||
var defSlideTime = 220;
|
||||
|
|
Loading…
Reference in New Issue