@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+16 -18
+2
resources/sql/patches/daemonstatuskey.sql
··· 1 + ALTER TABLE {$NAMESPACE}_daemon.daemon_log 2 + ADD KEY `status` (`status`);
+2 -17
src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
··· 21 21 22 22 public function processRequest() { 23 23 $logs = id(new PhabricatorDaemonLog())->loadAllWhere( 24 - '1 = 1 ORDER BY id DESC LIMIT 15'); 24 + '`status` != %s ORDER BY id DESC LIMIT 15', 'exit'); 25 25 26 26 $request = $this->getRequest(); 27 27 $user = $request->getUser(); ··· 31 31 $daemon_table->setDaemonLogs($logs); 32 32 33 33 $daemon_panel = new AphrontPanelView(); 34 - $daemon_panel->setHeader( 35 - 'Recently Launched Daemons'. 36 - ' · '. 37 - phutil_render_tag( 38 - 'a', 39 - array( 40 - 'href' => '/daemon/log/', 41 - ), 42 - 'View All Daemons'). 43 - ' · '. 44 - phutil_render_tag( 45 - 'a', 46 - array( 47 - 'href' => '/daemon/log/combined/', 48 - ), 49 - 'View Combined Log')); 34 + $daemon_panel->setHeader('Recently Launched Daemons'); 50 35 $daemon_panel->appendChild($daemon_table); 51 36 52 37 $tasks = id(new PhabricatorWorkerTask())->loadAllWhere(
+1
src/applications/daemon/controller/PhabricatorDaemonController.php
··· 24 24 25 25 $nav->addLabel('Daemons'); 26 26 $nav->addFilter('', 'Console', $this->getApplicationURI()); 27 + $nav->addFilter('log?show=running', 'Running Daemons'); 27 28 $nav->addFilter('log', 'All Daemons'); 28 29 $nav->addFilter('log/combined', 'Combined Log'); 29 30
+7 -1
src/applications/daemon/controller/PhabricatorDaemonLogListController.php
··· 25 25 $pager = new AphrontPagerView(); 26 26 $pager->setOffset($request->getInt('page')); 27 27 28 + $clause = '1 = 1'; 29 + if ($request->getStr('show') == 'running') { 30 + $clause = "`status` != 'exit'"; 31 + } 32 + 28 33 $logs = id(new PhabricatorDaemonLog())->loadAllWhere( 29 - '1 = 1 ORDER BY id DESC LIMIT %d, %d', 34 + '%Q ORDER BY id DESC LIMIT %d, %d', 35 + $clause, 30 36 $pager->getOffset(), 31 37 $pager->getPageSize() + 1); 32 38
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 964 964 'type' => 'sql', 965 965 'name' => $this->getPatchPath('policy-project.sql'), 966 966 ), 967 + 'daemonstatuskey.sql' => array( 968 + 'type' => 'sql', 969 + 'name' => $this->getPatchPath('daemonstatuskey.sql'), 970 + ), 967 971 ); 968 972 } 969 973