mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Add a main page to Nuance
Summary: Ref T8783. There's nothing at `/nuance/` right now, put something basic there. Test Plan: {F747078} Reviewers: chad Reviewed By: chad Maniphest Tasks: T8783 Differential Revision: https://secure.phabricator.com/D13965
This commit is contained in:
parent
3ef270b292
commit
b5672e7e55
3 changed files with 49 additions and 0 deletions
|
@ -1269,6 +1269,7 @@ phutil_register_library_map(array(
|
|||
'MultimeterSampleController' => 'applications/multimeter/controller/MultimeterSampleController.php',
|
||||
'MultimeterViewer' => 'applications/multimeter/storage/MultimeterViewer.php',
|
||||
'NuanceConduitAPIMethod' => 'applications/nuance/conduit/NuanceConduitAPIMethod.php',
|
||||
'NuanceConsoleController' => 'applications/nuance/controller/NuanceConsoleController.php',
|
||||
'NuanceController' => 'applications/nuance/controller/NuanceController.php',
|
||||
'NuanceCreateItemConduitAPIMethod' => 'applications/nuance/conduit/NuanceCreateItemConduitAPIMethod.php',
|
||||
'NuanceDAO' => 'applications/nuance/storage/NuanceDAO.php',
|
||||
|
@ -5049,6 +5050,7 @@ phutil_register_library_map(array(
|
|||
'MultimeterSampleController' => 'MultimeterController',
|
||||
'MultimeterViewer' => 'MultimeterDimension',
|
||||
'NuanceConduitAPIMethod' => 'ConduitAPIMethod',
|
||||
'NuanceConsoleController' => 'NuanceController',
|
||||
'NuanceController' => 'PhabricatorController',
|
||||
'NuanceCreateItemConduitAPIMethod' => 'NuanceConduitAPIMethod',
|
||||
'NuanceDAO' => 'PhabricatorLiskDAO',
|
||||
|
|
|
@ -38,6 +38,7 @@ final class PhabricatorNuanceApplication extends PhabricatorApplication {
|
|||
public function getRoutes() {
|
||||
return array(
|
||||
'/nuance/' => array(
|
||||
'' => 'NuanceConsoleController',
|
||||
'item/' => array(
|
||||
'view/(?P<id>[1-9]\d*)/' => 'NuanceItemViewController',
|
||||
'edit/(?P<id>[1-9]\d*)/' => 'NuanceItemEditController',
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
final class NuanceConsoleController extends NuanceController {
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $request->getViewer();
|
||||
|
||||
$menu = id(new PHUIObjectItemListView())
|
||||
->setUser($viewer);
|
||||
|
||||
$menu->addItem(
|
||||
id(new PHUIObjectItemView())
|
||||
->setHeader(pht('Queues'))
|
||||
->setHref($this->getApplicationURI('queue/'))
|
||||
->setFontIcon('fa-align-left')
|
||||
->addAttribute(pht('Manage Nuance queues.')));
|
||||
|
||||
$menu->addItem(
|
||||
id(new PHUIObjectItemView())
|
||||
->setHeader(pht('Sources'))
|
||||
->setHref($this->getApplicationURI('source/'))
|
||||
->setFontIcon('fa-filter')
|
||||
->addAttribute(pht('Manage Nuance sources.')));
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Console'));
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Console'))
|
||||
->setObjectList($menu);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$box,
|
||||
),
|
||||
array(
|
||||
'title' => pht('Nuance Console'),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue