mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added message box when devices haven't been polled for 15 minutes or more but are marked as up
This commit is contained in:
@ -309,12 +309,19 @@ echo('<em> Powered by <a href="/about/" target="_blank">' . $config['proj
|
||||
<?php
|
||||
}
|
||||
|
||||
if(dbFetchCell("SELECT COUNT(`device_id`) FROM `devices` WHERE `last_polled` <= DATE_ADD(NOW(), INTERVAL - 15 minute) AND `ignore` = 0 AND `disabled` = 0 AND status = 1",array()) > 0) {
|
||||
$msg_box[] = array('type' => 'warning', 'message' => "It appears as though you have some devices that haven't completed polling within the last 15 minutes, you may want to check that out :)",'title' => 'Devices unpolled');
|
||||
}
|
||||
|
||||
if(is_array($msg_box)) {
|
||||
echo("<script>
|
||||
toastr.options.timeout = 10;
|
||||
toastr.options.extendedTimeOut = 20;
|
||||
");
|
||||
foreach ($msg_box as $message) {
|
||||
$message['type'] = mres($message['type']);
|
||||
$message['message'] = mres($message['message']);
|
||||
$message['title'] = mres($message['title']);
|
||||
echo "toastr.".$message['type']."('".$message['message']."','".$message['title']."');\n";
|
||||
}
|
||||
echo("</script>");
|
||||
|
Reference in New Issue
Block a user