From 0fac48d71c58db27cbf2adc5eb1900b72903c35e Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 2 Jan 2018 16:43:13 +0100 Subject: [PATCH] Fix only show average graphs checkbox - #1460 --- .../operation/agentes/stat_win.php | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 38090623e0..8e27312304 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -100,6 +100,13 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent); else { $("#hidden-show_other").val(0); } + // + // if ($('#hidden-avg_only_sent').is(":checked") == true) { + // $("#hidden-avg_only_sent").val(1); + // } + // else { + // $("#hidden-avg_only_sent").val(0); + // } } //--> @@ -139,18 +146,16 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent); $draw_alerts = get_parameter("draw_alerts", 0); - if(isset($config['only_average']) && $config['only_average']){ - $avg_only = 1; - } - else { - $avg_only = 0; + if(isset($config['only_average'])){ + $avg_only = $config['only_average']; } - $show_other = get_parameter('show_other'); - if (isset($show_other) && $show_other) { + $show_other = get_parameter('show_other',-1); + + if ($show_other != -1) { $avg_only = $show_other; } - + $period = get_parameter ("period"); $id = get_parameter ("id", 0); $width = get_parameter ("width", STATWIN_DEFAULT_CHART_WIDTH);