mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Use PHUIObjectBoxView on Daemons
Summary: Consistent headers. Test Plan: Reviewed my running daemons Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8013
This commit is contained in:
parent
b479597a23
commit
75e7224c8a
2 changed files with 15 additions and 18 deletions
|
@ -116,15 +116,10 @@ final class PhabricatorDaemonConsoleController
|
|||
'n',
|
||||
));
|
||||
|
||||
$completed_header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Recently Completed Tasks (Last 15m)'));
|
||||
|
||||
$completed_panel = new AphrontPanelView();
|
||||
$completed_panel = new PHUIObjectBoxView();
|
||||
$completed_panel->setHeaderText(
|
||||
pht('Recently Completed Tasks (Last 15m)'));
|
||||
$completed_panel->appendChild($completed_table);
|
||||
$completed_panel->setNoBackground();
|
||||
|
||||
$daemon_header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Active Daemons'));
|
||||
|
||||
$daemon_table = new PhabricatorDaemonLogListView();
|
||||
$daemon_table->setUser($user);
|
||||
|
@ -151,6 +146,10 @@ final class PhabricatorDaemonConsoleController
|
|||
);
|
||||
}
|
||||
|
||||
$daemon_panel = new PHUIObjectBoxView();
|
||||
$daemon_panel->setHeaderText(pht('Active Daemons'));
|
||||
$daemon_panel->appendChild($daemon_table);
|
||||
|
||||
$leased_table = new AphrontTableView($rows);
|
||||
$leased_table->setHeaders(
|
||||
array(
|
||||
|
@ -172,10 +171,9 @@ final class PhabricatorDaemonConsoleController
|
|||
));
|
||||
$leased_table->setNoDataString(pht('No tasks are leased by workers.'));
|
||||
|
||||
$leased_panel = new AphrontPanelView();
|
||||
$leased_panel->setHeader('Leased Tasks');
|
||||
$leased_panel = new PHUIObjectBoxView();
|
||||
$leased_panel->setHeaderText(pht('Leased Tasks'));
|
||||
$leased_panel->appendChild($leased_table);
|
||||
$leased_panel->setNoBackground();
|
||||
|
||||
$task_table = new PhabricatorWorkerActiveTask();
|
||||
$queued = queryfx_all(
|
||||
|
@ -205,10 +203,9 @@ final class PhabricatorDaemonConsoleController
|
|||
));
|
||||
$queued_table->setNoDataString(pht('Task queue is empty.'));
|
||||
|
||||
$queued_panel = new AphrontPanelView();
|
||||
$queued_panel->setHeader(pht('Queued Tasks'));
|
||||
$queued_panel = new PHUIObjectBoxView();
|
||||
$queued_panel->setHeaderText(pht('Queued Tasks'));
|
||||
$queued_panel->appendChild($queued_table);
|
||||
$queued_panel->setNoBackground();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Console'));
|
||||
|
@ -218,10 +215,8 @@ final class PhabricatorDaemonConsoleController
|
|||
$nav->appendChild(
|
||||
array(
|
||||
$crumbs,
|
||||
$completed_header,
|
||||
$completed_panel,
|
||||
$daemon_header,
|
||||
$daemon_table,
|
||||
$daemon_panel,
|
||||
$queued_panel,
|
||||
$leased_panel,
|
||||
));
|
||||
|
|
|
@ -17,7 +17,9 @@ final class PhabricatorDaemonLogListView extends AphrontView {
|
|||
throw new Exception("Call setUser() before rendering!");
|
||||
}
|
||||
|
||||
$list = id(new PHUIObjectItemListView());
|
||||
$list = id(new PHUIObjectItemListView())
|
||||
->setCards(true)
|
||||
->setFlush(true);
|
||||
foreach ($this->daemonLogs as $log) {
|
||||
$id = $log->getID();
|
||||
$epoch = $log->getDateCreated();
|
||||
|
|
Loading…
Reference in a new issue