@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.

Modernize daemon application

Summary: Make it possible to get to stuff that used to be in tabs.

Test Plan: Clicked links and such.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3264

+113 -54
+2
src/__phutil_library_map__.php
··· 546 546 'PhabricatorApplicationApplications' => 'applications/meta/application/PhabricatorApplicationApplications.php', 547 547 'PhabricatorApplicationAudit' => 'applications/audit/application/PhabricatorApplicationAudit.php', 548 548 'PhabricatorApplicationAuth' => 'applications/auth/application/PhabricatorApplicationAuth.php', 549 + 'PhabricatorApplicationDaemons' => 'applications/daemon/application/PhabricatorApplicationDaemons.php', 549 550 'PhabricatorApplicationDifferential' => 'applications/differential/application/PhabricatorApplicationDifferential.php', 550 551 'PhabricatorApplicationDiffusion' => 'applications/diffusion/application/PhabricatorApplicationDiffusion.php', 551 552 'PhabricatorApplicationFact' => 'applications/fact/application/PhabricatorApplicationFact.php', ··· 1667 1668 'PhabricatorApplicationApplications' => 'PhabricatorApplication', 1668 1669 'PhabricatorApplicationAudit' => 'PhabricatorApplication', 1669 1670 'PhabricatorApplicationAuth' => 'PhabricatorApplication', 1671 + 'PhabricatorApplicationDaemons' => 'PhabricatorApplication', 1670 1672 'PhabricatorApplicationDifferential' => 'PhabricatorApplication', 1671 1673 'PhabricatorApplicationDiffusion' => 'PhabricatorApplication', 1672 1674 'PhabricatorApplicationFact' => 'PhabricatorApplication',
-14
src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
··· 151 151 'index/(?P<phid>[^/]+)/' => 'PhabricatorSearchIndexController', 152 152 ), 153 153 154 - '/daemon/' => array( 155 - 'task/(?P<id>\d+)/' => 'PhabricatorWorkerTaskDetailController', 156 - 'task/(?P<id>\d+)/(?P<action>[^/]+)/' 157 - => 'PhabricatorWorkerTaskUpdateController', 158 - 'log/' => array( 159 - '' => 'PhabricatorDaemonLogListController', 160 - 'combined/' => 'PhabricatorDaemonCombinedLogController', 161 - '(?P<id>\d+)/' => 'PhabricatorDaemonLogViewController', 162 - ), 163 - 'timeline/' => 'PhabricatorDaemonTimelineConsoleController', 164 - 'timeline/(?P<id>\d+)/' => 'PhabricatorDaemonTimelineEventController', 165 - '' => 'PhabricatorDaemonConsoleController', 166 - ), 167 - 168 154 '/herald/' => array( 169 155 '' => 'HeraldHomeController', 170 156 'view/(?P<content_type>[^/]+)/(?:(?P<rule_type>[^/]+)/)?'
+55
src/applications/daemon/application/PhabricatorApplicationDaemons.php
··· 1 + <?php 2 + 3 + /* 4 + * Copyright 2012 Facebook, Inc. 5 + * 6 + * Licensed under the Apache License, Version 2.0 (the "License"); 7 + * you may not use this file except in compliance with the License. 8 + * You may obtain a copy of the License at 9 + * 10 + * http://www.apache.org/licenses/LICENSE-2.0 11 + * 12 + * Unless required by applicable law or agreed to in writing, software 13 + * distributed under the License is distributed on an "AS IS" BASIS, 14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 + * See the License for the specific language governing permissions and 16 + * limitations under the License. 17 + */ 18 + 19 + final class PhabricatorApplicationDaemons extends PhabricatorApplication { 20 + 21 + public function getName() { 22 + return 'Daemon Console'; 23 + } 24 + 25 + public function getShortDescription() { 26 + return 'Manage Daemons'; 27 + } 28 + 29 + public function getBaseURI() { 30 + return '/daemon/'; 31 + } 32 + 33 + public function getTitleGlyph() { 34 + return "\xE2\x98\xAF"; 35 + } 36 + 37 + public function getRoutes() { 38 + return array( 39 + '/daemon/' => array( 40 + 'task/(?P<id>\d+)/' => 'PhabricatorWorkerTaskDetailController', 41 + 'task/(?P<id>\d+)/(?P<action>[^/]+)/' 42 + => 'PhabricatorWorkerTaskUpdateController', 43 + 'log/' => array( 44 + '' => 'PhabricatorDaemonLogListController', 45 + 'combined/' => 'PhabricatorDaemonCombinedLogController', 46 + '(?P<id>\d+)/' => 'PhabricatorDaemonLogViewController', 47 + ), 48 + 'timeline/' => 'PhabricatorDaemonTimelineConsoleController', 49 + 'timeline/(?P<id>\d+)/' => 'PhabricatorDaemonTimelineEventController', 50 + '' => 'PhabricatorDaemonConsoleController', 51 + ), 52 + ); 53 + } 54 + 55 + }
+6 -2
src/applications/daemon/controller/PhabricatorDaemonCombinedLogController.php
··· 45 45 $log_panel->appendChild($event_view); 46 46 $log_panel->appendChild($pager); 47 47 48 - return $this->buildStandardPageResponse( 49 - $log_panel, 48 + $nav = $this->buildSideNavView(); 49 + $nav->selectFilter('log/combined'); 50 + $nav->appendChild($log_panel); 51 + 52 + return $this->buildApplicationPage( 53 + $nav, 50 54 array( 51 55 'title' => 'Combined Daemon Log', 52 56 ));
+7 -3
src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
··· 155 155 $cursor_panel->setHeader('Timeline Cursors'); 156 156 $cursor_panel->appendChild($cursor_table); 157 157 158 - return $this->buildStandardPageResponse( 158 + $nav = $this->buildSideNavView(); 159 + $nav->selectFilter(''); 160 + $nav->appendChild( 159 161 array( 160 162 $daemon_panel, 161 163 $cursor_panel, 162 164 $queued_panel, 163 165 $leased_panel, 164 - ), 166 + )); 167 + 168 + return $this->buildApplicationPage( 169 + $nav, 165 170 array( 166 171 'title' => 'Console', 167 - 'tab' => 'console', 168 172 )); 169 173 } 170 174
+13 -22
src/applications/daemon/controller/PhabricatorDaemonController.php
··· 1 1 <?php 2 2 3 3 /* 4 - * Copyright 2011 Facebook, Inc. 4 + * Copyright 2012 Facebook, Inc. 5 5 * 6 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 7 * you may not use this file except in compliance with the License. ··· 18 18 19 19 abstract class PhabricatorDaemonController extends PhabricatorController { 20 20 21 - public function buildStandardPageResponse($view, array $data) { 22 - $page = $this->buildStandardPageView(); 21 + protected function buildSideNavView() { 22 + $nav = new AphrontSideNavFilterView(); 23 + $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 23 24 24 - $page->setApplicationName('Daemon Console'); 25 - $page->setBaseURI('/daemon/'); 26 - $page->setTitle(idx($data, 'title')); 27 - $page->setTabs( 28 - array( 29 - 'console' => array( 30 - 'href' => '/daemon/', 31 - 'name' => 'Console', 32 - ), 33 - 'timeline' => array( 34 - 'href' => '/daemon/timeline/', 35 - 'name' => 'Timeline', 36 - ), 37 - ), 38 - idx($data, 'tab')); 39 - $page->setGlyph("\xE2\x98\xAF"); 40 - $page->appendChild($view); 25 + $nav->addLabel('Daemons'); 26 + $nav->addFilter('', 'Console', $this->getApplicationURI()); 27 + $nav->addFilter('log', 'All Daemons'); 28 + $nav->addFilter('log/combined', 'Combined Log'); 29 + 30 + $nav->addSpacer(); 31 + $nav->addLabel('Event Timeline'); 32 + $nav->addFilter('timeline', 'Timeline'); 41 33 42 - $response = new AphrontWebpageResponse(); 43 - return $response->setContent($page->render()); 34 + return $nav; 44 35 } 45 36 46 37 }
+6 -2
src/applications/daemon/controller/PhabricatorDaemonLogListController.php
··· 42 42 $daemon_panel->appendChild($daemon_table); 43 43 $daemon_panel->appendChild($pager); 44 44 45 - return $this->buildStandardPageResponse( 46 - $daemon_panel, 45 + $nav = $this->buildSideNavView(); 46 + $nav->selectFilter('log'); 47 + $nav->appendChild($daemon_panel); 48 + 49 + return $this->buildApplicationPage( 50 + $nav, 47 51 array( 48 52 'title' => 'All Daemons', 49 53 ));
+6 -2
src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
··· 84 84 85 85 $content[] = $log_panel; 86 86 87 - return $this->buildStandardPageResponse( 88 - $content, 87 + $nav = $this->buildSideNavView(); 88 + $nav->selectFilter('log'); 89 + $nav->appendChild($content); 90 + 91 + return $this->buildApplicationPage( 92 + $nav, 89 93 array( 90 94 'title' => 'Daemon Log', 91 95 ));
+6 -4
src/applications/daemon/controller/PhabricatorDaemonTimelineConsoleController.php
··· 57 57 $event_panel->setHeader('Timeline Events'); 58 58 $event_panel->appendChild($event_table); 59 59 60 - return $this->buildStandardPageResponse( 61 - array( 62 - $event_panel, 63 - ), 60 + $nav = $this->buildSideNavView(); 61 + $nav->selectFilter('timeline'); 62 + $nav->appendChild($event_panel); 63 + 64 + return $this->buildApplicationPage( 65 + $nav, 64 66 array( 65 67 'title' => 'Timeline', 66 68 'tab' => 'timeline',
+6 -2
src/applications/daemon/controller/PhabricatorDaemonTimelineEventController.php
··· 70 70 $panel->setWidth(AphrontPanelView::WIDTH_FORM); 71 71 $panel->appendChild($form); 72 72 73 - return $this->buildStandardPageResponse( 74 - $panel, 73 + $nav = $this->buildSideNavView(); 74 + $nav->selectFilter('timeline'); 75 + $nav->appendChild($panel); 76 + 77 + return $this->buildApplicationPage( 78 + $nav, 75 79 array( 76 80 'title' => 'Timeline Event', 77 81 ));
+6 -2
src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
··· 145 145 ), 146 146 'Free Lease')); 147 147 148 - return $this->buildStandardPageResponse( 149 - $panel, 148 + $nav = $this->buildSideNavView(); 149 + $nav->selectFilter(''); 150 + $nav->appendChild($panel); 151 + 152 + return $this->buildApplicationPage( 153 + $nav, 150 154 array( 151 155 'title' => 'Task', 152 156 ));
-1
src/applications/daemon/controller/PhabricatorWorkerTaskUpdateController.php
··· 73 73 return new Aphront404Response(); 74 74 } 75 75 76 - 77 76 $dialog->addCancelButton('/daemon/'); 78 77 79 78 return id(new AphrontDialogResponse())->setDialog($dialog);