1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 06:20:56 +01:00

Slightly modernize Aphlict server status page

Summary:
Ref T4324. Add a real `Application` class. Use modern UI elements.

@chad, we could use an icon :3

Test Plan: {F114477}

Reviewers: chad, btrahan

Reviewed By: chad

CC: chad, aran

Maniphest Tasks: T4324

Differential Revision: https://secure.phabricator.com/D8254
This commit is contained in:
epriestley 2014-02-17 16:00:19 -08:00
parent 260eb5344b
commit 6740082df9
6 changed files with 49 additions and 20 deletions

View file

@ -45,7 +45,7 @@ return array(
'rsrc/css/application/chatlog/chatlog.css' => '852140ff',
'rsrc/css/application/config/config-options.css' => '7fedf08b',
'rsrc/css/application/config/config-template.css' => '25d446d6',
'rsrc/css/application/config/setup-issue.css' => '1bb81c53',
'rsrc/css/application/config/setup-issue.css' => '69e640e7',
'rsrc/css/application/conpherence/menu.css' => '561348ac',
'rsrc/css/application/conpherence/message-pane.css' => '2aedca89',
'rsrc/css/application/conpherence/notification.css' => 'f9ba9914',
@ -170,6 +170,7 @@ return array(
'rsrc/externals/javelin/core/__tests__/stratcom.js' => 'da194d4b',
'rsrc/externals/javelin/core/__tests__/util.js' => 'd3b157a9',
'rsrc/externals/javelin/core/init.js' => 'b88ab49e',
'rsrc/externals/javelin/core/init_node.js' => '9fe4895f',
'rsrc/externals/javelin/core/install.js' => '52a92793',
'rsrc/externals/javelin/core/util.js' => '7501647b',
'rsrc/externals/javelin/docs/Base.js' => '3b9ca7eb',
@ -775,7 +776,7 @@ return array(
'releeph-request-differential-create-dialog' => '8d8b92cd',
'releeph-request-typeahead-css' => '667a48ae',
'releeph-status' => 'a20631d9',
'setup-issue-css' => '1bb81c53',
'setup-issue-css' => '69e640e7',
'sprite-actions-css' => '969ad0e5',
'sprite-apps-css' => '6973a52b',
'sprite-apps-large-css' => '5abf49e9',

View file

@ -1114,6 +1114,7 @@ phutil_register_library_map(array(
'PhabricatorApplicationMailingLists' => 'applications/mailinglists/application/PhabricatorApplicationMailingLists.php',
'PhabricatorApplicationManiphest' => 'applications/maniphest/application/PhabricatorApplicationManiphest.php',
'PhabricatorApplicationMetaMTA' => 'applications/metamta/application/PhabricatorApplicationMetaMTA.php',
'PhabricatorApplicationNotifications' => 'applications/notification/application/PhabricatorApplicationNotifications.php',
'PhabricatorApplicationNuance' => 'applications/nuance/application/PhabricatorApplicationNuance.php',
'PhabricatorApplicationOwners' => 'applications/owners/application/PhabricatorApplicationOwners.php',
'PhabricatorApplicationPHIDTypeApplication' => 'applications/meta/phid/PhabricatorApplicationPHIDTypeApplication.php',
@ -3759,6 +3760,7 @@ phutil_register_library_map(array(
'PhabricatorApplicationMailingLists' => 'PhabricatorApplication',
'PhabricatorApplicationManiphest' => 'PhabricatorApplication',
'PhabricatorApplicationMetaMTA' => 'PhabricatorApplication',
'PhabricatorApplicationNotifications' => 'PhabricatorApplication',
'PhabricatorApplicationNuance' => 'PhabricatorApplication',
'PhabricatorApplicationOwners' => 'PhabricatorApplication',
'PhabricatorApplicationPHIDTypeApplication' => 'PhabricatorPHIDType',

View file

@ -48,15 +48,6 @@ class AphrontDefaultApplicationConfiguration
'keyboardshortcut/' => 'PhabricatorHelpKeyboardShortcutController',
),
'/notification/' => array(
'(?:(?P<filter>all|unread)/)?'
=> 'PhabricatorNotificationListController',
'panel/' => 'PhabricatorNotificationPanelController',
'individual/' => 'PhabricatorNotificationIndividualController',
'status/' => 'PhabricatorNotificationStatusController',
'clear/' => 'PhabricatorNotificationClearController',
),
'/debug/' => 'PhabricatorDebugController',
);
}

View file

@ -113,8 +113,7 @@ final class PhabricatorNotificationQuery
public function getQueryApplicationClass() {
// TODO: No actual "Notification" app yet, but there probably should be.
return null;
return 'PhabricatorApplicationNotifications';
}
}

View file

@ -0,0 +1,30 @@
<?php
final class PhabricatorApplicationNotifications extends PhabricatorApplication {
public function getBaseURI() {
return '/notification/';
}
public function getShortDescription() {
return pht('Beep Beep Bloop');
}
public function getRoutes() {
return array(
'/notification/' => array(
'(?:(?P<filter>all|unread)/)?'
=> 'PhabricatorNotificationListController',
'panel/' => 'PhabricatorNotificationPanelController',
'individual/' => 'PhabricatorNotificationIndividualController',
'status/' => 'PhabricatorNotificationStatusController',
'clear/' => 'PhabricatorNotificationClearController',
),
);
}
public function shouldAppearInLaunchView() {
return false;
}
}

View file

@ -20,10 +20,16 @@ final class PhabricatorNotificationStatusController
phutil_escape_html_newlines($ex->getMessage())));
}
return $this->buildStandardPageResponse(
$status,
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Status'));
return $this->buildApplicationPage(
array(
'title' => 'Aphlict Server Status',
$crumbs,
$status,
),
array(
'title' => pht('Notification Server Status'),
));
}
@ -53,10 +59,10 @@ final class PhabricatorNotificationStatusController
'wide',
));
$panel = new AphrontPanelView();
$panel->setHeader('Server Status');
$panel->appendChild($table);
$box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Server Status'))
->appendChild($table);
return $panel;
return $box;
}
}