mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 01:48:23 +01:00
Show related objects on daemon worker task queue detail pages
Summary: See PHI287. Currently, you can't get very much information about a task in the worker queue from the web UI. This is largely intentional (e.g., it's bad if we let you inspect the content of a "send an administrator's password reset email" task), and a lot of the data is task-class specific so it would be a lot of work to expose it, but we can add one useful piece of information pretty easily: for tasks with an `objectPHID` that points at a valid object that's visible to the user, tell the user which object the task is associated with. Test Plan: {F5386562} Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D18890
This commit is contained in:
parent
3b7547e726
commit
c637680445
1 changed files with 11 additions and 4 deletions
|
@ -79,13 +79,20 @@ final class PhabricatorWorkerTaskDetailController
|
|||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function buildPropertyListView(
|
||||
PhabricatorWorkerTask $task) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
private function buildPropertyListView(PhabricatorWorkerTask $task) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$view = new PHUIPropertyListView();
|
||||
|
||||
$object_phid = $task->getObjectPHID();
|
||||
if ($object_phid) {
|
||||
$handles = $viewer->loadHandles(array($object_phid));
|
||||
$handle = $handles[$object_phid];
|
||||
if ($handle->isComplete()) {
|
||||
$view->addProperty(pht('Object'), $handle->renderLink());
|
||||
}
|
||||
}
|
||||
|
||||
if ($task->isArchived()) {
|
||||
switch ($task->getResult()) {
|
||||
case PhabricatorWorkerArchiveTask::RESULT_SUCCESS:
|
||||
|
|
Loading…
Add table
Reference in a new issue