Page MenuHomePhabricator

D8901.id21124.diff
No OneTemporary

D8901.id21124.diff

diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableListController.php b/src/applications/harbormaster/controller/HarbormasterBuildableListController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildableListController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildableListController.php
@@ -32,6 +32,7 @@
$viewer = $this->getRequest()->getUser();
$list = new PHUIObjectItemListView();
+ $list->setStates(true);
foreach ($buildables as $buildable) {
$id = $buildable->getID();
@@ -52,19 +53,30 @@
$item->addIcon('wrench-grey', pht('Manual'));
}
- $list->addItem($item);
-
switch ($buildable->getBuildableStatus()) {
case HarbormasterBuildable::STATUS_PASSED:
- $item->setBarColor('green');
+ $item->setState(PHUIObjectItemView::STATE_SUCCESS);
break;
case HarbormasterBuildable::STATUS_FAILED:
- $item->setBarColor('red');
+ $item->setState(PHUIObjectItemView::STATE_FAIL);
+ break;
+ case HarbormasterBuildable::STATUS_BUILDING:
+ $item->setState(PHUIObjectItemView::STATE_BUILD);
+ break;
+ default:
+ $item->setState(PHUIObjectItemView::STATE_WARN);
break;
}
+
+ $list->addItem($item);
+
}
- return $list;
+ $box = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Buildables'))
+ ->appendChild($list);
+
+ return $box;
}
public function buildSideNavView($for_app = false) {
diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php
--- a/src/view/phui/PHUIObjectItemView.php
+++ b/src/view/phui/PHUIObjectItemView.php
@@ -30,6 +30,7 @@
const STATE_FAIL = 'red';
const STATE_WARN = 'yellow';
const STATE_NOTE = 'blue';
+ const STATE_BUILD = 'sky';
public function setDisabled($disabled) {
$this->disabled = $disabled;
@@ -129,6 +130,9 @@
case self::STATE_NOTE:
$fi = 'fa-info-circle blue';
break;
+ case self::STATE_BUILD:
+ $fi = 'fa-refresh ph-spin sky';
+ break;
}
$this->fontIcon = id(new PHUIIconView())
->setIconFont($fi.' fa-2x');

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 10:38 AM (14 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6921135
Default Alt Text
D8901.id21124.diff (2 KB)

Event Timeline