From f244b32b6c12e22b7cdff29ac3e771e4732d1367 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 30 Dec 2016 09:27:02 +0100 Subject: [PATCH 1/4] fixed ticket 4309 --- pandora_console/operation/agentes/estado_agente.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index e5d989394d..574c82cbd8 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -598,8 +598,8 @@ foreach ($agents as $agent) { $data[3] = ''.human_time_description_raw($agent["intervalo"]).""; $data[4] = ui_print_group_icon ($agent["id_grupo"], true); - - $data[5] = reporting_tiny_stats($agent, true, 'agent', ':', $strict_user); + $agent['not_init_count'] = $agent['notinit_count']; + $data[5] = reporting_tiny_stats($agent, true, ' ', ':', $strict_user); $data[6] = $status_img; From d50f1f8f3af81211ead92a237786dac8c6744947 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 30 Dec 2016 09:30:16 +0100 Subject: [PATCH 2/4] fixed minor error function reporting --- .../godmode/reporting/reporting_builder.php | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 4721e618ce..32b39fe279 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1992,24 +1992,18 @@ else { "reporting_" . $activeTab . "_tab", false, $buttons); } - - if ($resultOperationDB !== null) { - - $err = ''; - /* - if($_POST[sla_min]==''){ - $err.='You must enter some character in SLA min field
'; + switch ($_POST['type']) { + case 'custom_graph': + $err.='You must enter custom graph'; + break; + case 'SLA': + $err.='You must enter some character in SLA limit field'; + default: + $err.=''; + break; } - if($_POST[sla_max]==''){ - $err.='You must enter some character in SLA max field
'; - } - */ - if($_POST[sla_limit]==''){ - $err.='You must enter some character in SLA limit field'; - } - ui_print_result_message ($resultOperationDB, __('Successfull action'), __('Unsuccessfull action

'.$err)); } From 80a7266fa5674fd6606c207e72d583e459e72231 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 30 Dec 2016 11:14:53 +0100 Subject: [PATCH 3/4] fixed errors open interval graph gauge --- pandora_console/include/graphs/pandora.d3.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index b0d2ea58fc..99bfc6c496 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -881,10 +881,10 @@ function createGauge(name, etiqueta, value, min, max, min_warning,max_warning,mi //var range = config.max - config.min; var range = config.max - config.min; if (value !== false) { - if ( min_warning > 0 ) { + if ( min_warning >= 0 ) { config.yellowZones = [{ from: min_warning, to: max_warning }]; } - if ( min_critical > 0 ) { + if ( min_critical >= 0 ) { config.redZones = [{ from: min_critical, to: max_critical }]; } } From 958b284ced9aa6daa738147777f38e6ec66ba682 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 30 Dec 2016 11:52:43 +0100 Subject: [PATCH 4/4] fixed minor error graph gauge --- pandora_console/include/graphs/pandora.d3.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index 99bfc6c496..3efda50159 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -881,10 +881,10 @@ function createGauge(name, etiqueta, value, min, max, min_warning,max_warning,mi //var range = config.max - config.min; var range = config.max - config.min; if (value !== false) { - if ( min_warning >= 0 ) { + if ( min_warning >= 0 && ( min_warning != max_warning ) ) { config.yellowZones = [{ from: min_warning, to: max_warning }]; } - if ( min_critical >= 0 ) { + if ( min_critical >= 0 && ( min_critical != max_critical ) ) { config.redZones = [{ from: min_critical, to: max_critical }]; } } @@ -959,12 +959,12 @@ function createGauges(data, width, height, font_size, no_data_image, font) { mininum = 0; if (mininum == maxinum) mininum = 0; - + /* if (maximun_critical == 0 ) maximun_critical = maxinum; if (maximun_warning == 0 ) maximun_warning = minimun_critical; - + */ if ( maxinum <= minimun_warning ) { minimun_warning = 0; maximun_warning = 0;