mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Merge branch '74-muestra-last-contact-en-rojo-no-deberia-6' into 'pandora_6.0'
Functions_module now not use async modules to calc if last contact is major than… See merge request !191
This commit is contained in:
commit
081a494d01
@ -1405,8 +1405,7 @@ function agents_get_interval_status ($agent) {
|
||||
$now = time ();
|
||||
$diferencia = $now - $last_time;
|
||||
$time = ui_print_timestamp ($last_time, true, array('style' => 'font-size:6.5pt'));
|
||||
$min_interval = modules_get_agentmodule_mininterval($agent['id_agente']);
|
||||
|
||||
$min_interval = modules_get_agentmodule_mininterval_no_async($agent['id_agente']);
|
||||
$return = $time;
|
||||
if ($diferencia > ($min_interval["min_interval"] * 2))
|
||||
$return = '<b><span style="color: #ff0000;">'.$time.'</span></b>';
|
||||
|
@ -2436,4 +2436,13 @@ function modules_get_agentmodule_mininterval($id_agent) {
|
||||
$sql = sprintf('SELECT min(current_interval) min_interval from tagente_estado where id_agente = %d', $id_agent);
|
||||
return db_get_row_sql($sql);
|
||||
}
|
||||
function modules_get_agentmodule_mininterval_no_async($id_agent) {
|
||||
|
||||
$sql = 'SELECT 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;
|
||||
|
||||
return db_get_row_sql($sql);
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user