Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96576013
AlmanacConsoleController.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
Sat, Dec 28, 09:53
Size
2 KB
Mime Type
text/x-php
Expires
Mon, Dec 30, 09:53 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23209872
Attached To
rPH Phabricator
AlmanacConsoleController.php
View Options
<?php
final
class
AlmanacConsoleController
extends
AlmanacController
{
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
(
'Devices'
))
->
setHref
(
$this
->
getApplicationURI
(
'device/'
))
->
setIcon
(
'fa-server'
)
->
addAttribute
(
pht
(
'Create an inventory of physical and virtual hosts and '
.
'devices.'
)));
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Services'
))
->
setHref
(
$this
->
getApplicationURI
(
'service/'
))
->
setIcon
(
'fa-plug'
)
->
addAttribute
(
pht
(
'Create and update services, and map them to interfaces on '
.
'devices.'
)));
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Networks'
))
->
setHref
(
$this
->
getApplicationURI
(
'network/'
))
->
setIcon
(
'fa-globe'
)
->
addAttribute
(
pht
(
'Manage public and private networks.'
)));
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Namespaces'
))
->
setHref
(
$this
->
getApplicationURI
(
'namespace/'
))
->
setIcon
(
'fa-asterisk'
)
->
addAttribute
(
pht
(
'Control who can create new named services and devices.'
)));
$docs_uri
=
PhabricatorEnv
::
getDoclink
(
'Almanac User Guide'
);
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Documentation'
))
->
setHref
(
$docs_uri
)
->
setIcon
(
'fa-book'
)
->
addAttribute
(
pht
(
'Browse documentation for Almanac.'
)));
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
pht
(
'Console'
));
$box
=
id
(
new
PHUIObjectBoxView
())
->
setHeaderText
(
pht
(
'Console'
))
->
setObjectList
(
$menu
);
return
$this
->
newPage
()
->
setTitle
(
pht
(
'Almanac Console'
))
->
setCrumbs
(
$crumbs
)
->
appendChild
(
array
(
$box
,
));
}
}
Event Timeline
Log In to Comment