diff --git a/src/applications/daemon/application/PhabricatorApplicationDaemons.php b/src/applications/daemon/application/PhabricatorApplicationDaemons.php index ab69670c6b..c2209a4ab9 100644 --- a/src/applications/daemon/application/PhabricatorApplicationDaemons.php +++ b/src/applications/daemon/application/PhabricatorApplicationDaemons.php @@ -45,7 +45,7 @@ final class PhabricatorApplicationDaemons extends PhabricatorApplication { 'task/(?P\d+)/(?P[^/]+)/' => 'PhabricatorWorkerTaskUpdateController', 'log/' => array( - '' => 'PhabricatorDaemonLogListController', + '(?Prunning/)?' => 'PhabricatorDaemonLogListController', 'combined/' => 'PhabricatorDaemonCombinedLogController', '(?P\d+)/' => 'PhabricatorDaemonLogViewController', ), diff --git a/src/applications/daemon/controller/PhabricatorDaemonController.php b/src/applications/daemon/controller/PhabricatorDaemonController.php index f4a5e90818..9101d3914b 100644 --- a/src/applications/daemon/controller/PhabricatorDaemonController.php +++ b/src/applications/daemon/controller/PhabricatorDaemonController.php @@ -24,7 +24,7 @@ abstract class PhabricatorDaemonController extends PhabricatorController { $nav->addLabel('Daemons'); $nav->addFilter('', 'Console', $this->getApplicationURI()); - $nav->addFilter('log?show=running', 'Running Daemons'); + $nav->addFilter('log/running', 'Running Daemons'); $nav->addFilter('log', 'All Daemons'); $nav->addFilter('log/combined', 'Combined Log'); diff --git a/src/applications/daemon/controller/PhabricatorDaemonLogListController.php b/src/applications/daemon/controller/PhabricatorDaemonLogListController.php index a06a6254b5..ba1506bf7d 100644 --- a/src/applications/daemon/controller/PhabricatorDaemonLogListController.php +++ b/src/applications/daemon/controller/PhabricatorDaemonLogListController.php @@ -19,6 +19,12 @@ final class PhabricatorDaemonLogListController extends PhabricatorDaemonController { + private $running; + + public function willProcessRequest(array $data) { + $this->running = !empty($data['running']); + } + public function processRequest() { $request = $this->getRequest(); @@ -26,7 +32,7 @@ final class PhabricatorDaemonLogListController $pager->setOffset($request->getInt('page')); $clause = '1 = 1'; - if ($request->getStr('show') == 'running') { + if ($this->running) { $clause = "`status` != 'exit'"; } @@ -49,13 +55,13 @@ final class PhabricatorDaemonLogListController $daemon_panel->appendChild($pager); $nav = $this->buildSideNavView(); - $nav->selectFilter('log'); + $nav->selectFilter($this->running ? 'log/running' : 'log'); $nav->appendChild($daemon_panel); return $this->buildApplicationPage( $nav, array( - 'title' => 'All Daemons', + 'title' => $this->running ? 'Running Daemons' : 'All Daemons', )); }