1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Show status icon on build view

Summary: This shows the status icon and color along side the build status on the build view controller.

Test Plan: Viewed a build, saw the icon appear.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10094
This commit is contained in:
James Rhodes 2014-08-01 08:09:32 +10:00
parent dfa9b27a94
commit 7e0edd8ef0

View file

@ -353,11 +353,27 @@ final class HarbormasterBuildViewController
}
private function getStatus(HarbormasterBuild $build) {
$status_view = new PHUIStatusListView();
$item = new PHUIStatusItemView();
if ($build->isStopping()) {
return pht('Stopping');
$status_name = pht('Stopping');
$icon = PHUIStatusItemView::ICON_RIGHT;
$color = 'dark';
} else {
$status = $build->getBuildStatus();
$status_name =
HarbormasterBuild::getBuildStatusName($status);
$icon = HarbormasterBuild::getBuildStatusIcon($status);
$color = HarbormasterBuild::getBuildStatusColor($status);
}
return HarbormasterBuild::getBuildStatusName($build->getBuildStatus());
$item->setTarget($status_name);
$item->setIcon($icon, $color);
$status_view->addItem($item);
return $status_view;
}
private function buildMessages(array $messages) {