Merge branch '1456-Errores-en-paradas-planificadas-dev' into 'develop'
fixed icon with planned downtime See merge request artica/pandorafms!937
This commit is contained in:
commit
3c15924037
|
@ -540,10 +540,6 @@ if ($agents !== false) {
|
|||
}
|
||||
echo '<span class="left">';
|
||||
echo "<strong>";
|
||||
if ($agent['quiet']) {
|
||||
html_print_image("images/dot_green.disabled.png", false, array("border" => '0', "title" => __('Quiet'), "alt" => ""));
|
||||
echo " ";
|
||||
}
|
||||
|
||||
if (check_acl ($config["id_user"], $agent["id_grupo"], "AW")) {
|
||||
$main_tab = 'main';
|
||||
|
@ -562,7 +558,9 @@ if ($agents !== false) {
|
|||
"</a>";
|
||||
echo "</strong>";
|
||||
|
||||
$in_planned_downtime = db_get_value_filter('id', 'tplanned_downtime_agents', array('id_agent' => $agent["id_agente"]));
|
||||
$in_planned_downtime = db_get_sql('SELECT executed FROM tplanned_downtime
|
||||
INNER JOIN tplanned_downtime_agents ON tplanned_downtime.id = tplanned_downtime_agents.id_downtime
|
||||
WHERE tplanned_downtime_agents.id_agent = '. $agent["id_agente"] . ' AND tplanned_downtime.executed = 1');
|
||||
|
||||
if ($agent["disabled"]) {
|
||||
ui_print_help_tip(__('Disabled'));
|
||||
|
@ -572,6 +570,11 @@ if ($agents !== false) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($agent['quiet']) {
|
||||
echo " ";
|
||||
html_print_image("images/dot_green.disabled.png", false, array("border" => '0', "title" => __('Quiet'), "alt" => ""));
|
||||
}
|
||||
|
||||
if ($in_planned_downtime) {
|
||||
ui_print_help_tip (__('Agent in planned downtime'), false, 'images/minireloj-16.png');
|
||||
|
||||
|
|
|
@ -597,22 +597,38 @@ foreach ($agents as $agent) {
|
|||
$agent["warning_count"], $agent["unknown_count"], $agent["total_count"],
|
||||
$agent["notinit_count"]);
|
||||
|
||||
$in_planned_downtime = db_get_sql('SELECT executed FROM tplanned_downtime
|
||||
INNER JOIN tplanned_downtime_agents
|
||||
ON tplanned_downtime.id = tplanned_downtime_agents.id_downtime
|
||||
WHERE tplanned_downtime_agents.id_agent = '. $agent["id_agente"] .
|
||||
' AND tplanned_downtime.executed = 1');
|
||||
|
||||
$data = array ();
|
||||
|
||||
$data[0] = '<div class="left_' . $agent["id_agente"] . '">';
|
||||
$data[0] .= '<span>';
|
||||
if ($agent['quiet']) {
|
||||
$data[0] .= html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => "")) . " ";
|
||||
}
|
||||
|
||||
$data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'"> <span style="font-size: 7pt;font-weight:bold" title ="' . $agent["nombre"]. '">'.$agent["alias"].'</span></a>';
|
||||
$data[0] .= '</span>';
|
||||
|
||||
if ($agent['quiet']) {
|
||||
$data[0] .= " ";
|
||||
$data[0] .= html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => ""));
|
||||
}
|
||||
|
||||
if ($in_planned_downtime) {
|
||||
$data[0] .= ui_print_help_tip (__('Agent in planned downtime'), true, 'images/minireloj-16.png');
|
||||
$data[0] .= "</em>";
|
||||
}
|
||||
|
||||
$data[0] .= '<div class="agentleft_' . $agent["id_agente"] . '" style="visibility: hidden; clear: left;">';
|
||||
$data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'">'.__('View').'</a>';
|
||||
|
||||
if (check_acl ($config['id_user'], $agent["id_grupo"], "AW")) {
|
||||
$data[0] .= ' | ';
|
||||
$data[0] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$agent["id_agente"].'">'.__('Edit').'</a>';
|
||||
}
|
||||
|
||||
$data[0] .= '</div></div>';
|
||||
|
||||
$data[1] = ui_print_truncate_text($agent["description"], 'description', false, true, true, '[…]', 'font-size: 6.5pt');
|
||||
|
|
|
@ -74,7 +74,12 @@ $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"]));
|
||||
$in_planned_downtime = db_get_sql('SELECT executed FROM tplanned_downtime
|
||||
INNER JOIN tplanned_downtime_agents
|
||||
ON tplanned_downtime.id = tplanned_downtime_agents.id_downtime
|
||||
WHERE tplanned_downtime_agents.id_agent = '. $agent["id_agente"] .
|
||||
' AND tplanned_downtime.executed = 1');
|
||||
|
||||
|
||||
if ($agent['disabled']) {
|
||||
if ($in_planned_downtime) {
|
||||
|
|
|
@ -168,7 +168,7 @@ if ($searchAgents) {
|
|||
)
|
||||
";
|
||||
|
||||
$select = "SELECT t1.id_agente, t1.ultimo_contacto, t1.nombre, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled, t1.alias";
|
||||
$select = "SELECT t1.id_agente, t1.ultimo_contacto, t1.nombre, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled, t1.alias, t1.quiet";
|
||||
if ($only_count) {
|
||||
$limit = " ORDER BY " . $order['field'] . " " . $order['order'] .
|
||||
" LIMIT " . $config["block_size"] . " OFFSET 0";
|
||||
|
|
|
@ -70,13 +70,13 @@ else {
|
|||
|
||||
$table->align = array ();
|
||||
$table->align[0] = "left";
|
||||
$table->align[1] = "center";
|
||||
$table->align[2] = "center";
|
||||
$table->align[3] = "center";
|
||||
$table->align[4] = "center";
|
||||
$table->align[5] = "center";
|
||||
$table->align[6] = "center";
|
||||
$table->align[7] = "right";
|
||||
$table->align[1] = "left";
|
||||
$table->align[2] = "left";
|
||||
$table->align[3] = "left";
|
||||
$table->align[4] = "left";
|
||||
$table->align[5] = "left";
|
||||
$table->align[6] = "left";
|
||||
$table->align[7] = "left";
|
||||
$table->align[8] = "center";
|
||||
|
||||
$table->data = array ();
|
||||
|
@ -95,6 +95,22 @@ else {
|
|||
'<span style>'.$agent["alias"].'</span></b></a>';
|
||||
}
|
||||
|
||||
if ($agent['quiet']) {
|
||||
$cellName .= " ";
|
||||
$cellName .= html_print_image("images/dot_green.disabled.png", true, array("border" => '0', "title" => __('Quiet'), "alt" => ""));
|
||||
}
|
||||
|
||||
$in_planned_downtime = db_get_sql('SELECT executed FROM tplanned_downtime
|
||||
INNER JOIN tplanned_downtime_agents
|
||||
ON tplanned_downtime.id = tplanned_downtime_agents.id_downtime
|
||||
WHERE tplanned_downtime_agents.id_agent = '. $agent["id_agente"] .
|
||||
' AND tplanned_downtime.executed = 1');
|
||||
|
||||
if ($in_planned_downtime) {
|
||||
$cellName .= "<em>".ui_print_help_tip (__('Agent in planned downtime'), true, 'images/minireloj-16.png');
|
||||
$cellName .= "</em>";
|
||||
}
|
||||
|
||||
$last_time = strtotime ($agent["ultimo_contacto"]);
|
||||
$now = time ();
|
||||
$diferencia = $now - $last_time;
|
||||
|
|
Loading…
Reference in New Issue