Change unpolled devices toast to be based on rrd step (#9391)

* Change unpolled devices toast to be based on rrd step

* Update message

Change it back to 3x
This commit is contained in:
Tony Murray 2018-11-19 01:55:59 -06:00 committed by Neil Lathwood
parent 93433ce4b1
commit 6b379afffc

View File

@ -82,8 +82,10 @@ class Checks
Toastr::error("<a href='notifications/'>$notification->body</a>", $notification->title);
}
if (Device::isUp()->where('last_polled', '<=', Carbon::now()->subMinutes(15))->exists()) {
Toastr::warning('<a href="pollers/tab=log/filter=unpolled/">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 :)</a>', 'Devices unpolled');
$warn_sec = Config::get('rrd.step', 300) * 3;
if (Device::isUp()->where('last_polled', '<=', Carbon::now()->subSeconds($warn_sec))->exists()) {
$warn_min = $warn_sec / 60;
Toastr::warning('<a href="poll-log/filter=unpolled/">It appears as though you have some devices that haven\'t completed polling within the last ' . $warn_min . ' minutes, you may want to check that out :)</a>', 'Devices unpolled');
}
// Directory access checks