mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 01:32:42 +01:00
3a838ba312
Summary: Ref T10390. Dashboard usability is high enough that I think we should pin it by default for users to create custom home pages. Test Plan: Review order of applications in sandbox. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T10390 Differential Revision: https://secure.phabricator.com/D17527
69 lines
2.3 KiB
PHP
69 lines
2.3 KiB
PHP
<?php
|
|
|
|
final class PhabricatorDashboardApplication extends PhabricatorApplication {
|
|
|
|
public function getName() {
|
|
return pht('Dashboards');
|
|
}
|
|
|
|
public function getBaseURI() {
|
|
return '/dashboard/';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Create Custom Pages');
|
|
}
|
|
|
|
public function getIcon() {
|
|
return 'fa-dashboard';
|
|
}
|
|
|
|
public function isPinnedByDefault(PhabricatorUser $viewer) {
|
|
return true;
|
|
}
|
|
|
|
public function getApplicationOrder() {
|
|
return 0.160;
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/W(?P<id>\d+)' => 'PhabricatorDashboardPanelViewController',
|
|
'/dashboard/' => array(
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PhabricatorDashboardListController',
|
|
'view/(?P<id>\d+)/' => 'PhabricatorDashboardViewController',
|
|
'archive/(?P<id>\d+)/' => 'PhabricatorDashboardArchiveController',
|
|
'manage/(?P<id>\d+)/' => 'PhabricatorDashboardManageController',
|
|
'arrange/(?P<id>\d+)/' => 'PhabricatorDashboardArrangeController',
|
|
'create/' => 'PhabricatorDashboardEditController',
|
|
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardEditController',
|
|
'install/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardInstallController',
|
|
'addpanel/(?P<id>\d+)/' => 'PhabricatorDashboardAddPanelController',
|
|
'movepanel/(?P<id>\d+)/' => 'PhabricatorDashboardMovePanelController',
|
|
'removepanel/(?P<id>\d+)/'
|
|
=> 'PhabricatorDashboardRemovePanelController',
|
|
'panel/' => array(
|
|
'install/(?P<engineKey>[^/]+)/(?:(?P<queryKey>[^/]+)/)?' =>
|
|
'PhabricatorDashboardQueryPanelInstallController',
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PhabricatorDashboardPanelListController',
|
|
'create/' => 'PhabricatorDashboardPanelEditController',
|
|
$this->getEditRoutePattern('editpro/')
|
|
=> 'PhabricatorDashboardPanelEditproController',
|
|
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorDashboardPanelEditController',
|
|
'render/(?P<id>\d+)/' => 'PhabricatorDashboardPanelRenderController',
|
|
'archive/(?P<id>\d+)/'
|
|
=> 'PhabricatorDashboardPanelArchiveController',
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new PhabricatorDashboardRemarkupRule(),
|
|
);
|
|
}
|
|
|
|
}
|