mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +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:
parent
cf34185f2e
commit
784a59abd9
2 changed files with 12 additions and 12 deletions
|
@ -120,7 +120,7 @@ final class PhabricatorDaemonConsoleController
|
|||
$completed_panel = new PHUIObjectBoxView();
|
||||
$completed_panel->setHeaderText(
|
||||
pht('Recently Completed Tasks (Last 15m)'));
|
||||
$completed_panel->appendChild($completed_table);
|
||||
$completed_panel->setTable($completed_table);
|
||||
|
||||
$daemon_table = new PhabricatorDaemonLogListView();
|
||||
$daemon_table->setUser($viewer);
|
||||
|
@ -128,7 +128,7 @@ final class PhabricatorDaemonConsoleController
|
|||
|
||||
$daemon_panel = new PHUIObjectBoxView();
|
||||
$daemon_panel->setHeaderText(pht('Active Daemons'));
|
||||
$daemon_panel->appendChild($daemon_table);
|
||||
$daemon_panel->setObjectList($daemon_table);
|
||||
|
||||
|
||||
$tasks = id(new PhabricatorWorkerLeaseQuery())
|
||||
|
@ -143,7 +143,7 @@ final class PhabricatorDaemonConsoleController
|
|||
|
||||
$leased_panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Leased Tasks'))
|
||||
->appendChild($tasks_table);
|
||||
->setTable($tasks_table);
|
||||
|
||||
$task_table = new PhabricatorWorkerActiveTask();
|
||||
$queued = queryfx_all(
|
||||
|
@ -175,7 +175,7 @@ final class PhabricatorDaemonConsoleController
|
|||
|
||||
$queued_panel = new PHUIObjectBoxView();
|
||||
$queued_panel->setHeaderText(pht('Queued Tasks'));
|
||||
$queued_panel->appendChild($queued_table);
|
||||
$queued_panel->setTable($queued_table);
|
||||
|
||||
$upcoming = id(new PhabricatorWorkerLeaseQuery())
|
||||
->setLimit(10)
|
||||
|
@ -184,7 +184,7 @@ final class PhabricatorDaemonConsoleController
|
|||
|
||||
$upcoming_panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Next In Queue'))
|
||||
->appendChild(
|
||||
->setTable(
|
||||
id(new PhabricatorDaemonTasksTableView())
|
||||
->setTasks($upcoming)
|
||||
->setNoDataString(pht('Task queue is empty.')));
|
||||
|
@ -200,7 +200,7 @@ final class PhabricatorDaemonConsoleController
|
|||
|
||||
$triggers_panel = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Upcoming Triggers'))
|
||||
->appendChild($triggers_table);
|
||||
->setTable($triggers_table);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Console'));
|
||||
|
|
|
@ -34,17 +34,17 @@ final class PhabricatorDaemonLogListView extends AphrontView {
|
|||
switch ($status) {
|
||||
case PhabricatorDaemonLog::STATUS_RUNNING:
|
||||
if ($env_hash != $log->getEnvHash()) {
|
||||
$item->setBarColor('yellow');
|
||||
$item->setStatusIcon('fa-warning yellow');
|
||||
$item->addAttribute(pht(
|
||||
'This daemon is running with an out of date configuration and '.
|
||||
'should be restarted.'));
|
||||
} else {
|
||||
$item->setBarColor('green');
|
||||
$item->setStatusIcon('fa-rocket green');
|
||||
$item->addAttribute(pht('This daemon is running.'));
|
||||
}
|
||||
break;
|
||||
case PhabricatorDaemonLog::STATUS_DEAD:
|
||||
$item->setBarColor('red');
|
||||
$item->setStatusIcon('fa-warning red');
|
||||
$item->addAttribute(
|
||||
pht(
|
||||
'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'));
|
||||
break;
|
||||
case PhabricatorDaemonLog::STATUS_WAIT:
|
||||
$item->setBarColor('blue');
|
||||
$item->setStatusIcon('fa-clock-o blue');
|
||||
$item->addAttribute(
|
||||
pht(
|
||||
'This daemon encountered an error recently and is waiting a '.
|
||||
|
@ -70,12 +70,12 @@ final class PhabricatorDaemonLogListView extends AphrontView {
|
|||
break;
|
||||
case PhabricatorDaemonLog::STATUS_UNKNOWN:
|
||||
default:
|
||||
$item->setBarColor('orange');
|
||||
$item->setStatusIcon('fa-warning orange');
|
||||
$item->addAttribute(
|
||||
pht(
|
||||
'This daemon has not reported its status recently. It may '.
|
||||
'have exited uncleanly.'));
|
||||
$item->addIcon('fa-exclamation-circle', pht('Unknown'));
|
||||
$item->addIcon('fa-warning', pht('Unknown'));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue