Merge branch '1168-icon-to-know-if-agent-is-in-planned-downtime-dev' into 'develop'

Added iconin agent view

See merge request !851
This commit is contained in:
vgilc 2017-09-25 10:39:45 +02:00
commit 04dc184b62
1 changed files with 20 additions and 2 deletions

View File

@ -74,17 +74,35 @@ $table_agent->data = array();
$data = array(); $data = array();
$agent_name = ui_print_agent_name($agent["id_agente"], true, 500, "font-size: medium;font-weight:bold", true); $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']) { if ($agent['disabled']) {
$agent_name = "<em>" . $agent_name . "</em>" . ui_print_help_tip(__('Disabled'), true); if ($in_planned_downtime) {
$agent_name = "<em>" . $agent_name . ui_print_help_tip(__('Disabled'), true);
}
else {
$agent_name = "<em>" . $agent_name . "</em>" . ui_print_help_tip(__('Disabled'), true);
}
} }
else if ($agent['quiet']) { else if ($agent['quiet']) {
$agent_name = "<em'>" . $agent_name . "&nbsp;" . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . "</em>"; if ($in_planned_downtime) {
$agent_name = "<em'>" . $agent_name . "&nbsp;" . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => ""));
}
else {
$agent_name = "<em'>" . $agent_name . "&nbsp;" . html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . "</em>";
}
} }
else { else {
$agent_name = $agent_name; $agent_name = $agent_name;
} }
if ($in_planned_downtime && !$agent['disabled'] && !$agent['quiet']) {
$agent_name .= "<em>" . "&nbsp;" . ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png') . "</em>";
}
else if (($in_planned_downtime && !$agent['disabled']) || ($in_planned_downtime && !$agent['quiet'])) {
$agent_name .= "&nbsp;" . ui_print_help_tip(__('Agent in planned downtime'), true, 'images/minireloj-16.png') . "</em>";
}
if (!$config["show_group_name"]) if (!$config["show_group_name"])
$data[0] = ui_print_group_icon ($agent["id_grupo"], true); $data[0] = ui_print_group_icon ($agent["id_grupo"], true);
else else