mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Default the Almanac Devices query to "Active Devices"
Summary: Ref T13641. Now that we can provide an "Active Devices" query, provide it and make it the default. Test Plan: Viewed Almanac devices, got a list of active devices. Clicked "All Devices" to get all devices. Maniphest Tasks: T13641 Differential Revision: https://secure.phabricator.com/D21636
This commit is contained in:
parent
12341e4bc8
commit
e6a23274fe
1 changed files with 4 additions and 1 deletions
|
@ -71,6 +71,7 @@ final class AlmanacDeviceSearchEngine
|
||||||
|
|
||||||
protected function getBuiltinQueryNames() {
|
protected function getBuiltinQueryNames() {
|
||||||
$names = array(
|
$names = array(
|
||||||
|
'active' => pht('Active Devices'),
|
||||||
'all' => pht('All Devices'),
|
'all' => pht('All Devices'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -78,11 +79,13 @@ final class AlmanacDeviceSearchEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildSavedQueryFromBuiltin($query_key) {
|
public function buildSavedQueryFromBuiltin($query_key) {
|
||||||
|
|
||||||
$query = $this->newSavedQuery();
|
$query = $this->newSavedQuery();
|
||||||
$query->setQueryKey($query_key);
|
$query->setQueryKey($query_key);
|
||||||
|
|
||||||
switch ($query_key) {
|
switch ($query_key) {
|
||||||
|
case 'active':
|
||||||
|
$active_statuses = AlmanacDeviceStatus::getActiveStatusList();
|
||||||
|
return $query->setParameter('statuses', $active_statuses);
|
||||||
case 'all':
|
case 'all':
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue