Minor cleanup for task rendering in Daemons
Summary: Fixes two issues: - When rendering a task's details, we currently issue a policy-oblivious query. Instead, issue a policy-aware query. - The formatting is a little bit weird, with the top half in a box and the bottom half with an older style. Make them consistent. Test Plan: Looked at the detail pages for several tasks in queue. Reviewers: btrahan, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D7812
This commit is contained in:
@@ -41,19 +41,23 @@ final class PhabricatorWorkerTaskDetailController
|
||||
$actions = $this->buildActionListView($task);
|
||||
$properties = $this->buildPropertyListView($task, $actions);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($properties);
|
||||
|
||||
|
||||
$retry_head = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Retries'));
|
||||
|
||||
$retry_info = $this->buildRetryListView($task);
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($properties);
|
||||
$retry_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($retry_head)
|
||||
->addPropertyList($retry_info);
|
||||
|
||||
$content = array(
|
||||
$object_box,
|
||||
$retry_head,
|
||||
$retry_info,
|
||||
$retry_box,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -118,6 +122,8 @@ final class PhabricatorWorkerTaskDetailController
|
||||
PhabricatorWorkerTask $task,
|
||||
PhabricatorActionListView $actions) {
|
||||
|
||||
$viewer = $this->getRequest()->getUser();
|
||||
|
||||
$view = new PHUIPropertyListView();
|
||||
$view->setActionList($actions);
|
||||
|
||||
@@ -191,7 +197,7 @@ final class PhabricatorWorkerTaskDetailController
|
||||
$data = id(new PhabricatorWorkerTaskData())->load($task->getDataID());
|
||||
$task->setData($data->getData());
|
||||
$worker = $task->getWorkerInstance();
|
||||
$data = $worker->renderForDisplay();
|
||||
$data = $worker->renderForDisplay($viewer);
|
||||
|
||||
$view->addProperty(
|
||||
pht('Data'),
|
||||
|
||||
Reference in New Issue
Block a user