Merge pull request #9199 from murrant/last-polled

Fix devices unpolled check
This commit is contained in:
TheGreatDoc
2018-09-13 16:22:59 +02:00
committed by GitHub

View File

@@ -31,8 +31,8 @@ use Auth;
use Cache;
use Carbon\Carbon;
use Dotenv\Dotenv;
use Toastr;
use LibreNMS\Config;
use Toastr;
class Checks
{
@@ -166,7 +166,7 @@ class Checks
Toastr::error("<a href='notifications/'>$notification->body</a>", $notification->title);
}
if (Device::isUp()->whereTime('last_polled', '<=', Carbon::now()->subMinutes(15))->count() > 0) {
if (Device::isUp()->where('last_polled', '<=', Carbon::now()->subMinutes(15))->exists()) {
Toastr::warning('<a href="poll-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');
}