Page MenuHomePhabricator

D8901.id.diff
No OneTemporary

D8901.id.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
Sat, Oct 19, 11:32 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728157
Default Alt Text
D8901.id.diff (2 KB)

Event Timeline