Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98197473
HarbormasterBuildLogViewController.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
Fri, Jan 10, 23:12
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 12, 23:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23529208
Attached To
rPH Phabricator
HarbormasterBuildLogViewController.php
View Options
<?php
final
class
HarbormasterBuildLogViewController
extends
HarbormasterController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$log
=
id
(
new
HarbormasterBuildLogQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
executeOne
();
if
(!
$log
)
{
return
new
Aphront404Response
();
}
$target
=
$log
->
getBuildTarget
();
$build
=
$target
->
getBuild
();
$page_title
=
pht
(
'Build Log %d'
,
$log
->
getID
());
$log_view
=
id
(
new
HarbormasterBuildLogView
())
->
setViewer
(
$viewer
)
->
setBuildLog
(
$log
)
->
setHighlightedLineRange
(
$request
->
getURIData
(
'lines'
))
->
setEnableHighlighter
(
true
);
$crumbs
=
$this
->
buildApplicationCrumbs
()
->
addTextCrumb
(
pht
(
'Build Logs'
))
->
addTextCrumb
(
pht
(
'Build %d'
,
$build
->
getID
()),
$build
->
getURI
())
->
addTextCrumb
(
$page_title
)
->
setBorder
(
true
);
$page_header
=
id
(
new
PHUIHeaderView
())
->
setHeader
(
$page_title
);
$page_view
=
id
(
new
PHUITwoColumnView
())
->
setHeader
(
$page_header
)
->
setFooter
(
$log_view
);
return
$this
->
newPage
()
->
setTitle
(
$page_title
)
->
setCrumbs
(
$crumbs
)
->
appendChild
(
$page_view
);
}
}
Event Timeline
Log In to Comment