1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 11:42: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:
Chad Little 2014-01-20 12:08:09 -08:00
parent b479597a23
commit 75e7224c8a
2 changed files with 15 additions and 18 deletions

View file

@ -116,15 +116,10 @@ final class PhabricatorDaemonConsoleController
'n', 'n',
)); ));
$completed_header = id(new PHUIHeaderView()) $completed_panel = new PHUIObjectBoxView();
->setHeader(pht('Recently Completed Tasks (Last 15m)')); $completed_panel->setHeaderText(
pht('Recently Completed Tasks (Last 15m)'));
$completed_panel = new AphrontPanelView();
$completed_panel->appendChild($completed_table); $completed_panel->appendChild($completed_table);
$completed_panel->setNoBackground();
$daemon_header = id(new PHUIHeaderView())
->setHeader(pht('Active Daemons'));
$daemon_table = new PhabricatorDaemonLogListView(); $daemon_table = new PhabricatorDaemonLogListView();
$daemon_table->setUser($user); $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 = new AphrontTableView($rows);
$leased_table->setHeaders( $leased_table->setHeaders(
array( array(
@ -172,10 +171,9 @@ final class PhabricatorDaemonConsoleController
)); ));
$leased_table->setNoDataString(pht('No tasks are leased by workers.')); $leased_table->setNoDataString(pht('No tasks are leased by workers.'));
$leased_panel = new AphrontPanelView(); $leased_panel = new PHUIObjectBoxView();
$leased_panel->setHeader('Leased Tasks'); $leased_panel->setHeaderText(pht('Leased Tasks'));
$leased_panel->appendChild($leased_table); $leased_panel->appendChild($leased_table);
$leased_panel->setNoBackground();
$task_table = new PhabricatorWorkerActiveTask(); $task_table = new PhabricatorWorkerActiveTask();
$queued = queryfx_all( $queued = queryfx_all(
@ -205,10 +203,9 @@ final class PhabricatorDaemonConsoleController
)); ));
$queued_table->setNoDataString(pht('Task queue is empty.')); $queued_table->setNoDataString(pht('Task queue is empty.'));
$queued_panel = new AphrontPanelView(); $queued_panel = new PHUIObjectBoxView();
$queued_panel->setHeader(pht('Queued Tasks')); $queued_panel->setHeaderText(pht('Queued Tasks'));
$queued_panel->appendChild($queued_table); $queued_panel->appendChild($queued_table);
$queued_panel->setNoBackground();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Console')); $crumbs->addTextCrumb(pht('Console'));
@ -218,10 +215,8 @@ final class PhabricatorDaemonConsoleController
$nav->appendChild( $nav->appendChild(
array( array(
$crumbs, $crumbs,
$completed_header,
$completed_panel, $completed_panel,
$daemon_header, $daemon_panel,
$daemon_table,
$queued_panel, $queued_panel,
$leased_panel, $leased_panel,
)); ));

View file

@ -17,7 +17,9 @@ final class PhabricatorDaemonLogListView extends AphrontView {
throw new Exception("Call setUser() before rendering!"); throw new Exception("Call setUser() before rendering!");
} }
$list = id(new PHUIObjectItemListView()); $list = id(new PHUIObjectItemListView())
->setCards(true)
->setFlush(true);
foreach ($this->daemonLogs as $log) { foreach ($this->daemonLogs as $log) {
$id = $log->getID(); $id = $log->getID();
$epoch = $log->getDateCreated(); $epoch = $log->getDateCreated();