Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2358518
PhabricatorDaemonBulkJobViewController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorDaemonBulkJobViewController.php
View Options
<?php
final
class
PhabricatorDaemonBulkJobViewController
extends
PhabricatorDaemonController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$job
=
id
(
new
PhabricatorWorkerBulkJobQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$request
->
getURIData
(
'id'
)))
->
executeOne
();
if
(!
$job
)
{
return
new
Aphront404Response
();
}
$title
=
pht
(
'Bulk Job %d'
,
$job
->
getID
());
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
pht
(
'Bulk Jobs'
),
'/daemon/bulk/'
);
$crumbs
->
addTextCrumb
(
$title
);
$properties
=
$this
->
renderProperties
(
$job
);
$actions
=
$this
->
renderActions
(
$job
);
$properties
->
setActionList
(
$actions
);
$box
=
id
(
new
PHUIObjectBoxView
())
->
setHeaderText
(
$title
)
->
addPropertyList
(
$properties
);
$timeline
=
$this
->
buildTransactionTimeline
(
$job
,
new
PhabricatorWorkerBulkJobTransactionQuery
());
$timeline
->
setShouldTerminate
(
true
);
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$box
,
$timeline
,
),
array
(
'title'
=>
$title
,
));
}
private
function
renderProperties
(
PhabricatorWorkerBulkJob
$job
)
{
$viewer
=
$this
->
getViewer
();
$view
=
id
(
new
PHUIPropertyListView
())
->
setUser
(
$viewer
)
->
setObject
(
$job
);
$view
->
addProperty
(
pht
(
'Author'
),
$viewer
->
renderHandle
(
$job
->
getAuthorPHID
()));
$view
->
addProperty
(
pht
(
'Status'
),
$job
->
getStatusName
());
return
$view
;
}
private
function
renderActions
(
PhabricatorWorkerBulkJob
$job
)
{
$viewer
=
$this
->
getViewer
();
$actions
=
id
(
new
PhabricatorActionListView
())
->
setUser
(
$viewer
)
->
setObject
(
$job
);
$actions
->
addAction
(
id
(
new
PhabricatorActionView
())
->
setHref
(
$job
->
getDoneURI
())
->
setIcon
(
'fa-arrow-circle-o-right'
)
->
setName
(
pht
(
'Continue'
)));
return
$actions
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 3:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
439357
Default Alt Text
PhabricatorDaemonBulkJobViewController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment