mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +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:
parent
dfa9b27a94
commit
7e0edd8ef0
1 changed files with 18 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue