diff --git a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php index 956ade5ed4..9f98abb292 100644 --- a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php +++ b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php @@ -71,6 +71,7 @@ final class AlmanacDeviceSearchEngine protected function getBuiltinQueryNames() { $names = array( + 'active' => pht('Active Devices'), 'all' => pht('All Devices'), ); @@ -78,11 +79,13 @@ final class AlmanacDeviceSearchEngine } public function buildSavedQueryFromBuiltin($query_key) { - $query = $this->newSavedQuery(); $query->setQueryKey($query_key); switch ($query_key) { + case 'active': + $active_statuses = AlmanacDeviceStatus::getActiveStatusList(); + return $query->setParameter('statuses', $active_statuses); case 'all': return $query; }