From 83e9276f1b43e79af642c923f54afb0c547fdd24 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 25 Sep 2017 10:25:12 +0200 Subject: [PATCH 1/2] Added iconin agent view --- .../operation/agentes/estado_generalagente.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 111abffeee..8c19bcd284 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -74,9 +74,15 @@ $table_agent->data = array(); $data = array(); $agent_name = ui_print_agent_name($agent["id_agente"], true, 500, "font-size: medium;font-weight:bold", true); +$in_planned_downtime = db_get_value_filter('id', 'tplanned_downtime_agents', array('id_agent' => $agent["id_agente"])); if ($agent['disabled']) { - $agent_name = "" . $agent_name . "" . ui_print_help_tip(__('Disabled'), true); + if ($in_planned_downtime) { + $agent_name = "" . $agent_name . ui_print_help_tip(__('Disabled'), true); + } + else { + $agent_name = "" . $agent_name . "" . ui_print_help_tip(__('Disabled'), true); + } } else if ($agent['quiet']) { $agent_name = "" . $agent_name . " " . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . ""; @@ -85,6 +91,13 @@ else { $agent_name = $agent_name; } +if ($in_planned_downtime && !$agent['disabled']) { + $agent_name .= "" . " " . ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png') . ""; +} +else if ($in_planned_downtime) { + $agent_name .= " " . ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png') . ""; +} + if (!$config["show_group_name"]) $data[0] = ui_print_group_icon ($agent["id_grupo"], true); else From 7b437d612a5c9d380f0699420c7e3b48bbb457ca Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 25 Sep 2017 10:29:34 +0200 Subject: [PATCH 2/2] Added with quiet agent to --- .../operation/agentes/estado_generalagente.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 8c19bcd284..80a891b38e 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -85,16 +85,21 @@ if ($agent['disabled']) { } } else if ($agent['quiet']) { - $agent_name = "" . $agent_name . " " . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . ""; + if ($in_planned_downtime) { + $agent_name = "" . $agent_name . " " . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")); + } + else { + $agent_name = "" . $agent_name . " " . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . ""; + } } else { $agent_name = $agent_name; } -if ($in_planned_downtime && !$agent['disabled']) { +if ($in_planned_downtime && !$agent['disabled'] && !$agent['quiet']) { $agent_name .= "" . " " . ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png') . ""; } -else if ($in_planned_downtime) { +else if (($in_planned_downtime && !$agent['disabled']) || ($in_planned_downtime && !$agent['quiet'])) { $agent_name .= " " . ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png') . ""; }