Show list of non-exited daemons

Summary: This is arguably a more useful view than listing all daemons.

Test Plan: Looked at list, only saw daemons that haven't exited

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3286
This commit is contained in:
Nick Harper
2012-08-14 18:01:15 -07:00
parent dc2fd46027
commit 3908f7db2e
5 changed files with 16 additions and 18 deletions

View File

@@ -25,8 +25,14 @@ final class PhabricatorDaemonLogListController
$pager = new AphrontPagerView();
$pager->setOffset($request->getInt('page'));
$clause = '1 = 1';
if ($request->getStr('show') == 'running') {
$clause = "`status` != 'exit'";
}
$logs = id(new PhabricatorDaemonLog())->loadAllWhere(
'1 = 1 ORDER BY id DESC LIMIT %d, %d',
'%Q ORDER BY id DESC LIMIT %d, %d',
$clause,
$pager->getOffset(),
$pager->getPageSize() + 1);