Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / almanac / application / PhabricatorAlmanacApplication.php
blob27b41e9cd089e13a3bc8f8ac47bd75b4b1da3d67
1 <?php
3 final class PhabricatorAlmanacApplication extends PhabricatorApplication {
5 public function getBaseURI() {
6 return '/almanac/';
9 public function getName() {
10 return pht('Almanac');
13 public function getShortDescription() {
14 return pht('Service Directory');
17 public function getIcon() {
18 return 'fa-server';
21 public function getTitleGlyph() {
22 return "\xE2\x98\x82";
25 public function getApplicationGroup() {
26 return self::GROUP_UTILITIES;
29 public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
30 return array(
31 array(
32 'name' => pht('Almanac User Guide'),
33 'href' => PhabricatorEnv::getDoclink('Almanac User Guide'),
38 public function getRoutes() {
39 return array(
40 '/almanac/' => array(
41 '' => 'AlmanacConsoleController',
42 '(?P<objectType>service)/' => array(
43 $this->getQueryRoutePattern() => 'AlmanacServiceListController',
44 $this->getEditRoutePattern('edit/') => 'AlmanacServiceEditController',
45 'view/(?P<name>[^/]+)/' => 'AlmanacServiceViewController',
47 '(?P<objectType>device)/' => array(
48 $this->getQueryRoutePattern() => 'AlmanacDeviceListController',
49 $this->getEditRoutePattern('edit/') => 'AlmanacDeviceEditController',
50 'view/(?P<name>[^/]+)/' => 'AlmanacDeviceViewController',
52 'interface/' => array(
53 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacInterfaceEditController',
54 'delete/(?:(?P<id>\d+)/)?' => 'AlmanacInterfaceDeleteController',
56 'binding/' => array(
57 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacBindingEditController',
58 'disable/(?:(?P<id>\d+)/)?' => 'AlmanacBindingDisableController',
59 '(?P<id>\d+)/' => 'AlmanacBindingViewController',
61 'network/' => array(
62 $this->getQueryRoutePattern() => 'AlmanacNetworkListController',
63 'edit/(?:(?P<id>\d+)/)?' => 'AlmanacNetworkEditController',
64 '(?P<id>\d+)/' => 'AlmanacNetworkViewController',
66 'namespace/' => array(
67 $this->getQueryRoutePattern() => 'AlmanacNamespaceListController',
68 $this->getEditRoutePattern('edit/')
69 => 'AlmanacNamespaceEditController',
70 '(?P<id>\d+)/' => 'AlmanacNamespaceViewController',
72 'property/' => array(
73 'delete/' => 'AlmanacPropertyDeleteController',
74 'update/' => 'AlmanacPropertyEditController',
80 protected function getCustomCapabilities() {
81 $cluster_caption = pht(
82 'This permission is very dangerous. %s',
83 phutil_tag(
84 'a',
85 array(
86 'href' => PhabricatorEnv::getDoclink('Clustering Introduction'),
87 'target' => '_blank',
89 pht('Learn More')));
91 return array(
92 AlmanacCreateServicesCapability::CAPABILITY => array(
93 'default' => PhabricatorPolicies::POLICY_ADMIN,
95 AlmanacCreateDevicesCapability::CAPABILITY => array(
96 'default' => PhabricatorPolicies::POLICY_ADMIN,
98 AlmanacCreateNetworksCapability::CAPABILITY => array(
99 'default' => PhabricatorPolicies::POLICY_ADMIN,
101 AlmanacCreateNamespacesCapability::CAPABILITY => array(
102 'default' => PhabricatorPolicies::POLICY_ADMIN,
104 AlmanacManageClusterServicesCapability::CAPABILITY => array(
105 'default' => PhabricatorPolicies::POLICY_NOONE,
106 'caption' => $cluster_caption,