Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97888682
DrydockConsoleController.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
Tue, Jan 7, 05:36
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jan 9, 05:36 (2 d)
Engine
blob
Format
Raw Data
Handle
23431190
Attached To
rPH Phabricator
DrydockConsoleController.php
View Options
<?php
final
class
DrydockConsoleController
extends
DrydockController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
buildSideNavView
()
{
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
// These are only used on mobile.
$nav
->
addFilter
(
'blueprint'
,
pht
(
'Blueprints'
));
$nav
->
addFilter
(
'resource'
,
pht
(
'Resources'
));
$nav
->
addFilter
(
'lease'
,
pht
(
'Leases'
));
$nav
->
addFilter
(
'log'
,
pht
(
'Logs'
));
$nav
->
selectFilter
(
null
);
return
$nav
;
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$menu
=
id
(
new
PHUIObjectItemListView
())
->
setUser
(
$viewer
);
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Blueprints'
))
->
setHref
(
$this
->
getApplicationURI
(
'blueprint/'
))
->
addAttribute
(
pht
(
'Configure blueprints so Drydock can build resources, like '
.
'hosts and working copies.'
)));
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Resources'
))
->
setHref
(
$this
->
getApplicationURI
(
'resource/'
))
->
addAttribute
(
pht
(
'View and manage resources Drydock has built, like hosts.'
)));
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Leases'
))
->
setHref
(
$this
->
getApplicationURI
(
'lease/'
))
->
addAttribute
(
pht
(
'Manage leases on resources.'
)));
$menu
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
pht
(
'Logs'
))
->
setHref
(
$this
->
getApplicationURI
(
'log/'
))
->
addAttribute
(
pht
(
'View logs.'
)));
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
pht
(
'Console'
));
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$menu
,
),
array
(
'title'
=>
pht
(
'Drydock Console'
),
));
}
}
Event Timeline
Log In to Comment