1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

[Redesign] Update Daemons UI

Summary: Ref T8099, updates table layouts and StatusIcons in the Daemons application.

Test Plan: Click on lots of different things in Daemons.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

Differential Revision: https://secure.phabricator.com/D13052
This commit is contained in:
Chad Little 2015-05-28 11:13:18 -07:00
parent cf34185f2e
commit 784a59abd9
2 changed files with 12 additions and 12 deletions

View file

@ -120,7 +120,7 @@ final class PhabricatorDaemonConsoleController
$completed_panel = new PHUIObjectBoxView(); $completed_panel = new PHUIObjectBoxView();
$completed_panel->setHeaderText( $completed_panel->setHeaderText(
pht('Recently Completed Tasks (Last 15m)')); pht('Recently Completed Tasks (Last 15m)'));
$completed_panel->appendChild($completed_table); $completed_panel->setTable($completed_table);
$daemon_table = new PhabricatorDaemonLogListView(); $daemon_table = new PhabricatorDaemonLogListView();
$daemon_table->setUser($viewer); $daemon_table->setUser($viewer);
@ -128,7 +128,7 @@ final class PhabricatorDaemonConsoleController
$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->setObjectList($daemon_table);
$tasks = id(new PhabricatorWorkerLeaseQuery()) $tasks = id(new PhabricatorWorkerLeaseQuery())
@ -143,7 +143,7 @@ final class PhabricatorDaemonConsoleController
$leased_panel = id(new PHUIObjectBoxView()) $leased_panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Leased Tasks')) ->setHeaderText(pht('Leased Tasks'))
->appendChild($tasks_table); ->setTable($tasks_table);
$task_table = new PhabricatorWorkerActiveTask(); $task_table = new PhabricatorWorkerActiveTask();
$queued = queryfx_all( $queued = queryfx_all(
@ -175,7 +175,7 @@ final class PhabricatorDaemonConsoleController
$queued_panel = new PHUIObjectBoxView(); $queued_panel = new PHUIObjectBoxView();
$queued_panel->setHeaderText(pht('Queued Tasks')); $queued_panel->setHeaderText(pht('Queued Tasks'));
$queued_panel->appendChild($queued_table); $queued_panel->setTable($queued_table);
$upcoming = id(new PhabricatorWorkerLeaseQuery()) $upcoming = id(new PhabricatorWorkerLeaseQuery())
->setLimit(10) ->setLimit(10)
@ -184,7 +184,7 @@ final class PhabricatorDaemonConsoleController
$upcoming_panel = id(new PHUIObjectBoxView()) $upcoming_panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Next In Queue')) ->setHeaderText(pht('Next In Queue'))
->appendChild( ->setTable(
id(new PhabricatorDaemonTasksTableView()) id(new PhabricatorDaemonTasksTableView())
->setTasks($upcoming) ->setTasks($upcoming)
->setNoDataString(pht('Task queue is empty.'))); ->setNoDataString(pht('Task queue is empty.')));
@ -200,7 +200,7 @@ final class PhabricatorDaemonConsoleController
$triggers_panel = id(new PHUIObjectBoxView()) $triggers_panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Upcoming Triggers')) ->setHeaderText(pht('Upcoming Triggers'))
->appendChild($triggers_table); ->setTable($triggers_table);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Console')); $crumbs->addTextCrumb(pht('Console'));

View file

@ -34,17 +34,17 @@ final class PhabricatorDaemonLogListView extends AphrontView {
switch ($status) { switch ($status) {
case PhabricatorDaemonLog::STATUS_RUNNING: case PhabricatorDaemonLog::STATUS_RUNNING:
if ($env_hash != $log->getEnvHash()) { if ($env_hash != $log->getEnvHash()) {
$item->setBarColor('yellow'); $item->setStatusIcon('fa-warning yellow');
$item->addAttribute(pht( $item->addAttribute(pht(
'This daemon is running with an out of date configuration and '. 'This daemon is running with an out of date configuration and '.
'should be restarted.')); 'should be restarted.'));
} else { } else {
$item->setBarColor('green'); $item->setStatusIcon('fa-rocket green');
$item->addAttribute(pht('This daemon is running.')); $item->addAttribute(pht('This daemon is running.'));
} }
break; break;
case PhabricatorDaemonLog::STATUS_DEAD: case PhabricatorDaemonLog::STATUS_DEAD:
$item->setBarColor('red'); $item->setStatusIcon('fa-warning red');
$item->addAttribute( $item->addAttribute(
pht( pht(
'This daemon is lost or exited uncleanly, and is presumed '. 'This daemon is lost or exited uncleanly, and is presumed '.
@ -61,7 +61,7 @@ final class PhabricatorDaemonLogListView extends AphrontView {
$item->addIcon('fa-check grey', pht('Exited')); $item->addIcon('fa-check grey', pht('Exited'));
break; break;
case PhabricatorDaemonLog::STATUS_WAIT: case PhabricatorDaemonLog::STATUS_WAIT:
$item->setBarColor('blue'); $item->setStatusIcon('fa-clock-o blue');
$item->addAttribute( $item->addAttribute(
pht( pht(
'This daemon encountered an error recently and is waiting a '. 'This daemon encountered an error recently and is waiting a '.
@ -70,12 +70,12 @@ final class PhabricatorDaemonLogListView extends AphrontView {
break; break;
case PhabricatorDaemonLog::STATUS_UNKNOWN: case PhabricatorDaemonLog::STATUS_UNKNOWN:
default: default:
$item->setBarColor('orange'); $item->setStatusIcon('fa-warning orange');
$item->addAttribute( $item->addAttribute(
pht( pht(
'This daemon has not reported its status recently. It may '. 'This daemon has not reported its status recently. It may '.
'have exited uncleanly.')); 'have exited uncleanly.'));
$item->addIcon('fa-exclamation-circle', pht('Unknown')); $item->addIcon('fa-warning', pht('Unknown'));
break; break;
} }