Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F92921
D7812.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D7812.diff
View Options
diff --git a/src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php b/src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
--- a/src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
+++ b/src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
@@ -41,19 +41,23 @@
$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 @@
PhabricatorWorkerTask $task,
PhabricatorActionListView $actions) {
+ $viewer = $this->getRequest()->getUser();
+
$view = new PHUIPropertyListView();
$view->setActionList($actions);
@@ -191,7 +197,7 @@
$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'),
diff --git a/src/applications/metamta/PhabricatorMetaMTAWorker.php b/src/applications/metamta/PhabricatorMetaMTAWorker.php
--- a/src/applications/metamta/PhabricatorMetaMTAWorker.php
+++ b/src/applications/metamta/PhabricatorMetaMTAWorker.php
@@ -41,7 +41,7 @@
return $this->message;
}
- public function renderForDisplay() {
+ public function renderForDisplay(PhabricatorUser $viewer) {
return phutil_tag(
'pre',
array(
diff --git a/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php b/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php
--- a/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php
+++ b/src/applications/repository/worker/PhabricatorRepositoryCommitParserWorker.php
@@ -64,19 +64,21 @@
return (bool)$bad_commit;
}
- public function renderForDisplay() {
- $suffix = parent::renderForDisplay();
- $commit = $this->loadCommit();
+ public function renderForDisplay(PhabricatorUser $viewer) {
+ $suffix = parent::renderForDisplay($viewer);
+
+ $commit = id(new DiffusionCommitQuery())
+ ->setViewer($viewer)
+ ->withIDs(array(idx($this->getTaskData(), 'commitID')))
+ ->executeOne();
if (!$commit) {
return $suffix;
}
- // TODO: (T603) This method should probably take a viewer.
+ $link = DiffusionView::linkCommit(
+ $commit->getRepository(),
+ $commit->getCommitIdentifier());
- $repository = id(new PhabricatorRepository())
- ->load($commit->getRepositoryID());
- $link = DiffusionView::linkCommit($repository,
- $commit->getCommitIdentifier());
- return hsprintf('%s%s', $link, $suffix);
+ return array($link, $suffix);
}
}
diff --git a/src/infrastructure/daemon/workers/PhabricatorWorker.php b/src/infrastructure/daemon/workers/PhabricatorWorker.php
--- a/src/infrastructure/daemon/workers/PhabricatorWorker.php
+++ b/src/infrastructure/daemon/workers/PhabricatorWorker.php
@@ -154,7 +154,7 @@
}
}
- public function renderForDisplay() {
+ public function renderForDisplay(PhabricatorUser $viewer) {
$data = PhutilReadableSerializer::printableValue($this->data);
return phutil_tag('pre', array(), $data);
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ui/54/vbnunjgt3pfxxgr4
Default Alt Text
D7812.diff (3 KB)
Attached To
Mode
D7812: Minor cleanup for task rendering in Daemons
Attached
Detach File
Event Timeline
Log In to Comment