Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98262356
DrydockRepositoryOperationStatusController.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, Jan 11, 13:54
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 13, 13:54 (2 d)
Engine
blob
Format
Raw Data
Handle
23543610
Attached To
rPH Phabricator
DrydockRepositoryOperationStatusController.php
View Options
<?php
final
class
DrydockRepositoryOperationStatusController
extends
DrydockController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$operation
=
id
(
new
DrydockRepositoryOperationQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
executeOne
();
if
(!
$operation
)
{
return
new
Aphront404Response
();
}
$id
=
$operation
->
getID
();
$status_view
=
id
(
new
DrydockRepositoryOperationStatusView
())
->
setUser
(
$viewer
)
->
setOperation
(
$operation
);
if
(
$request
->
isAjax
())
{
$payload
=
array
(
'markup'
=>
$status_view
->
renderUnderwayState
(),
'isUnderway'
=>
$operation
->
isUnderway
(),
);
return
id
(
new
AphrontAjaxResponse
())
->
setContent
(
$payload
);
}
$title
=
pht
(
'Repository Operation %d'
,
$id
);
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
pht
(
'Operations'
),
$this
->
getApplicationURI
(
'operation/'
));
$crumbs
->
addTextCrumb
(
$title
);
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$status_view
,
),
array
(
'title'
=>
array
(
$title
,
pht
(
'Status'
),
),
));
}
}
Event Timeline
Log In to Comment