Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / drydock / application / PhabricatorDrydockApplication.php
blob79bc1cb0d757450f041c3325b43d604bfd6c3f2b
1 <?php
3 final class PhabricatorDrydockApplication extends PhabricatorApplication {
5 public function getBaseURI() {
6 return '/drydock/';
9 public function getName() {
10 return pht('Drydock');
13 public function getShortDescription() {
14 return pht('Allocate Software Resources');
17 public function getIcon() {
18 return 'fa-truck';
21 public function getTitleGlyph() {
22 return "\xE2\x98\x82";
25 public function getFlavorText() {
26 return pht('A nautical adventure.');
29 public function getApplicationGroup() {
30 return self::GROUP_UTILITIES;
33 public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
34 return array(
35 array(
36 'name' => pht('Drydock User Guide'),
37 'href' => PhabricatorEnv::getDoclink('Drydock User Guide'),
42 public function getRoutes() {
43 return array(
44 '/drydock/' => array(
45 '' => 'DrydockConsoleController',
46 '(?P<type>blueprint)/' => array(
47 '(?:query/(?P<queryKey>[^/]+)/)?' => 'DrydockBlueprintListController',
48 '(?P<id>[1-9]\d*)/' => array(
49 '' => 'DrydockBlueprintViewController',
50 '(?P<action>disable|enable)/' =>
51 'DrydockBlueprintDisableController',
52 'resources/(?:query/(?P<queryKey>[^/]+)/)?' =>
53 'DrydockResourceListController',
54 'logs/(?:query/(?P<queryKey>[^/]+)/)?' =>
55 'DrydockLogListController',
56 'authorizations/(?:query/(?P<queryKey>[^/]+)/)?' =>
57 'DrydockAuthorizationListController',
59 $this->getEditRoutePattern('edit/')
60 => 'DrydockBlueprintEditController',
62 '(?P<type>resource)/' => array(
63 '(?:query/(?P<queryKey>[^/]+)/)?' => 'DrydockResourceListController',
64 '(?P<id>[1-9]\d*)/' => array(
65 '' => 'DrydockResourceViewController',
66 'release/' => 'DrydockResourceReleaseController',
67 'leases/(?:query/(?P<queryKey>[^/]+)/)?' =>
68 'DrydockLeaseListController',
69 'logs/(?:query/(?P<queryKey>[^/]+)/)?' =>
70 'DrydockLogListController',
73 '(?P<type>lease)/' => array(
74 '(?:query/(?P<queryKey>[^/]+)/)?' => 'DrydockLeaseListController',
75 '(?P<id>[1-9]\d*)/' => array(
76 '' => 'DrydockLeaseViewController',
77 'release/' => 'DrydockLeaseReleaseController',
78 'logs/(?:query/(?P<queryKey>[^/]+)/)?' =>
79 'DrydockLogListController',
82 '(?P<type>authorization)/' => array(
83 '(?P<id>[1-9]\d*)/' => array(
84 '' => 'DrydockAuthorizationViewController',
85 '(?P<action>authorize|decline)/' =>
86 'DrydockAuthorizationAuthorizeController',
89 '(?P<type>operation)/' => array(
90 '(?:query/(?P<queryKey>[^/]+)/)?'
91 => 'DrydockRepositoryOperationListController',
92 '(?P<id>[1-9]\d*)/' => array(
93 '' => 'DrydockRepositoryOperationViewController',
94 'status/' => 'DrydockRepositoryOperationStatusController',
95 'dismiss/' => 'DrydockRepositoryOperationDismissController',
96 'logs/(?:query/(?P<queryKey>[^/]+)/)?' =>
97 'DrydockLogListController',
104 protected function getCustomCapabilities() {
105 return array(
106 DrydockDefaultViewCapability::CAPABILITY => array(
107 'template' => DrydockBlueprintPHIDType::TYPECONST,
108 'capability' => PhabricatorPolicyCapability::CAN_VIEW,
110 DrydockDefaultEditCapability::CAPABILITY => array(
111 'default' => PhabricatorPolicies::POLICY_ADMIN,
112 'template' => DrydockBlueprintPHIDType::TYPECONST,
113 'capability' => PhabricatorPolicyCapability::CAN_EDIT,
115 DrydockCreateBlueprintsCapability::CAPABILITY => array(
116 'default' => PhabricatorPolicies::POLICY_ADMIN,