Merge branch '74-muestra-last-contact-en-rojo-no-deberia-2' into 'develop'
Check interval filter agents without modules and disabled modules - #74 See merge request !217
This commit is contained in:
parent
5b22363d7e
commit
5b4e69ed21
|
@ -1407,7 +1407,7 @@ function agents_get_interval_status ($agent) {
|
|||
$time = ui_print_timestamp ($last_time, true, array('style' => 'font-size:6.5pt'));
|
||||
$min_interval = modules_get_agentmodule_mininterval_no_async($agent['id_agente']);
|
||||
$return = $time;
|
||||
if ($diferencia > ($min_interval["min_interval"] * 2))
|
||||
if ($diferencia > ($min_interval["min_interval"] * 2) && $min_interval['num_interval'] > 0)
|
||||
$return = '<b><span style="color: #ff0000;">'.$time.'</span></b>';
|
||||
|
||||
return $return;
|
||||
|
|
|
@ -2428,10 +2428,10 @@ function modules_get_agentmodule_mininterval($id_agent) {
|
|||
}
|
||||
function modules_get_agentmodule_mininterval_no_async($id_agent) {
|
||||
|
||||
$sql = 'SELECT MIN(tae.current_interval) AS min_interval
|
||||
$sql = 'SELECT COUNT(tae.current_interval) AS num_interval, MIN(tae.current_interval) AS min_interval
|
||||
FROM tagente_estado tae
|
||||
INNER JOIN tagente_modulo tam ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||
INNER JOIN ttipo_modulo ttm ON tam.id_tipo_modulo = ttm.id_tipo where ttm.nombre not like "async%" and tae.id_agente = '.$id_agent;
|
||||
INNER JOIN ttipo_modulo ttm ON tam.id_tipo_modulo = ttm.id_tipo where ttm.nombre not like "async%" and tae.id_agente = '.$id_agent.' and tam.disabled = 0';
|
||||
|
||||
return db_get_row_sql($sql);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue