Differential D9871 Diff 23765 src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
$rows = array(); | $rows = array(); | ||||
foreach ($tasks as $task) { | foreach ($tasks as $task) { | ||||
$rows[] = array( | $rows[] = array( | ||||
$task->getID(), | $task->getID(), | ||||
$task->getTaskClass(), | $task->getTaskClass(), | ||||
$task->getLeaseOwner(), | $task->getLeaseOwner(), | ||||
$task->getLeaseExpires() - time(), | $task->getLeaseExpires() - time(), | ||||
$task->getPriority(), | |||||
$task->getFailureCount(), | $task->getFailureCount(), | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => '/daemon/task/'.$task->getID().'/', | 'href' => '/daemon/task/'.$task->getID().'/', | ||||
'class' => 'button small grey', | 'class' => 'button small grey', | ||||
), | ), | ||||
pht('View Task')), | pht('View Task')), | ||||
); | ); | ||||
} | } | ||||
$daemon_panel = new PHUIObjectBoxView(); | $daemon_panel = new PHUIObjectBoxView(); | ||||
$daemon_panel->setHeaderText(pht('Active Daemons')); | $daemon_panel->setHeaderText(pht('Active Daemons')); | ||||
$daemon_panel->appendChild($daemon_table); | $daemon_panel->appendChild($daemon_table); | ||||
$leased_table = new AphrontTableView($rows); | $leased_table = new AphrontTableView($rows); | ||||
$leased_table->setHeaders( | $leased_table->setHeaders( | ||||
array( | array( | ||||
pht('ID'), | pht('ID'), | ||||
pht('Class'), | pht('Class'), | ||||
pht('Owner'), | pht('Owner'), | ||||
pht('Expires'), | pht('Expires'), | ||||
pht('Priority'), | |||||
pht('Failures'), | pht('Failures'), | ||||
'', | '', | ||||
)); | )); | ||||
$leased_table->setColumnClasses( | $leased_table->setColumnClasses( | ||||
array( | array( | ||||
'n', | 'n', | ||||
'wide', | 'wide', | ||||
'', | '', | ||||
'', | '', | ||||
'n', | 'n', | ||||
'n', | |||||
'action', | 'action', | ||||
)); | )); | ||||
$leased_table->setNoDataString(pht('No tasks are leased by workers.')); | $leased_table->setNoDataString(pht('No tasks are leased by workers.')); | ||||
$leased_panel = new PHUIObjectBoxView(); | $leased_panel = new PHUIObjectBoxView(); | ||||
$leased_panel->setHeaderText(pht('Leased Tasks')); | $leased_panel->setHeaderText(pht('Leased Tasks')); | ||||
$leased_panel->appendChild($leased_table); | $leased_panel->appendChild($leased_table); | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |