Updated unpolled notification to only show unpolled devices

This commit is contained in:
laf
2016-06-21 20:12:32 +01:00
parent cfea3ba13d
commit 06998420cf
3 changed files with 21 additions and 2 deletions

View File

@@ -19,6 +19,10 @@ if (isset($searchPhrase) && !empty($searchPhrase)) {
$sql .= " AND (hostname LIKE '%$searchPhrase%' OR last_polled LIKE '%$searchPhrase%' OR last_polled_timetaken LIKE '%$searchPhrase%')";
}
if ($_POST['type'] == "unpolled") {
$sql .= " AND `last_polled` <= DATE_ADD(NOW(), INTERVAL - 15 minute)";
}
if (!isset($sort) || empty($sort)) {
$sort = 'last_polled_timetaken DESC';
}