Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90665108
PhabricatorAlmanacApplication.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Nov 3, 17:03
Size
3 KB
Mime Type
text/x-php
Expires
Tue, Nov 5, 17:03 (2 d)
Engine
blob
Format
Raw Data
Handle
22116500
Attached To
rPH Phabricator
PhabricatorAlmanacApplication.php
View Options
<?php
final
class
PhabricatorAlmanacApplication
extends
PhabricatorApplication
{
public
function
getBaseURI
()
{
return
'/almanac/'
;
}
public
function
getName
()
{
return
pht
(
'Almanac'
);
}
public
function
getShortDescription
()
{
return
pht
(
'Service Directory'
);
}
public
function
getIcon
()
{
return
'fa-server'
;
}
public
function
getTitleGlyph
()
{
return
"
\x
E2
\x
98
\x
82"
;
}
public
function
getApplicationGroup
()
{
return
self
::
GROUP_UTILITIES
;
}
public
function
getHelpDocumentationArticles
(
PhabricatorUser
$viewer
)
{
return
array
(
array
(
'name'
=>
pht
(
'Almanac User Guide'
),
'href'
=>
PhabricatorEnv
::
getDoclink
(
'Almanac User Guide'
),
),
);
}
public
function
isPrototype
()
{
return
true
;
}
public
function
getRoutes
()
{
return
array
(
'/almanac/'
=>
array
(
''
=>
'AlmanacConsoleController'
,
'(?P<objectType>service)/'
=>
array
(
$this
->
getQueryRoutePattern
()
=>
'AlmanacServiceListController'
,
'edit/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacServiceEditController'
,
'view/(?P<name>[^/]+)/'
=>
'AlmanacServiceViewController'
,
),
'(?P<objectType>device)/'
=>
array
(
$this
->
getQueryRoutePattern
()
=>
'AlmanacDeviceListController'
,
'edit/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacDeviceEditController'
,
'view/(?P<name>[^/]+)/'
=>
'AlmanacDeviceViewController'
,
),
'interface/'
=>
array
(
'edit/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacInterfaceEditController'
,
'delete/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacInterfaceDeleteController'
,
),
'binding/'
=>
array
(
'edit/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacBindingEditController'
,
'disable/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacBindingDisableController'
,
'(?P<id>
\d
+)/'
=>
'AlmanacBindingViewController'
,
),
'network/'
=>
array
(
$this
->
getQueryRoutePattern
()
=>
'AlmanacNetworkListController'
,
'edit/(?:(?P<id>
\d
+)/)?'
=>
'AlmanacNetworkEditController'
,
'(?P<id>
\d
+)/'
=>
'AlmanacNetworkViewController'
,
),
'namespace/'
=>
array
(
$this
->
getQueryRoutePattern
()
=>
'AlmanacNamespaceListController'
,
$this
->
getEditRoutePattern
(
'edit/'
)
=>
'AlmanacNamespaceEditController'
,
'(?P<id>
\d
+)/'
=>
'AlmanacNamespaceViewController'
,
),
'property/'
=>
array
(
'delete/'
=>
'AlmanacPropertyDeleteController'
,
'update/'
=>
'AlmanacPropertyEditController'
,
),
),
);
}
protected
function
getCustomCapabilities
()
{
$cluster_caption
=
pht
(
'This permission is very dangerous. %s'
,
phutil_tag
(
'a'
,
array
(
'href'
=>
PhabricatorEnv
::
getDoclink
(
'User Guide: Phabricator Clusters'
),
'target'
=>
'_blank'
,
),
pht
(
'Learn More'
)));
return
array
(
AlmanacCreateServicesCapability
::
CAPABILITY
=>
array
(
'default'
=>
PhabricatorPolicies
::
POLICY_ADMIN
,
),
AlmanacCreateDevicesCapability
::
CAPABILITY
=>
array
(
'default'
=>
PhabricatorPolicies
::
POLICY_ADMIN
,
),
AlmanacCreateNetworksCapability
::
CAPABILITY
=>
array
(
'default'
=>
PhabricatorPolicies
::
POLICY_ADMIN
,
),
AlmanacCreateNamespacesCapability
::
CAPABILITY
=>
array
(
'default'
=>
PhabricatorPolicies
::
POLICY_ADMIN
,
),
AlmanacManageClusterServicesCapability
::
CAPABILITY
=>
array
(
'default'
=>
PhabricatorPolicies
::
POLICY_NOONE
,
'caption'
=>
$cluster_caption
,
),
);
}
}
Event Timeline
Log In to Comment