Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14024679
D15467.id37284.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
17 KB
Referenced Files
None
Subscribers
None
D15467.id37284.diff
View Options
diff --git a/src/applications/drydock/controller/DrydockAuthorizationViewController.php b/src/applications/drydock/controller/DrydockAuthorizationViewController.php
--- a/src/applications/drydock/controller/DrydockAuthorizationViewController.php
+++ b/src/applications/drydock/controller/DrydockAuthorizationViewController.php
@@ -26,16 +26,14 @@
->setUser($viewer)
->setPolicyObject($authorization);
-
$state = $authorization->getBlueprintAuthorizationState();
$icon = DrydockAuthorization::getBlueprintStateIcon($state);
$name = DrydockAuthorization::getBlueprintStateName($state);
$header->setStatus($icon, null, $name);
- $actions = $this->buildActionListView($authorization);
+ $curtain = $this->buildCurtain($authorization);
$properties = $this->buildPropertyListView($authorization);
- $properties->setActionList($actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(
@@ -45,29 +43,32 @@
$blueprint->getBlueprintName(),
$this->getApplicationURI("blueprint/{$blueprint_id}/"));
$crumbs->addTextCrumb($title);
+ $crumbs->setBorder(true);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->addPropertyList($properties);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $object_box,
- ),
- array(
- 'title' => $title,
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->addPropertySection(pht('Properties'), $properties);
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild(
+ array(
+ $view,
));
}
- private function buildActionListView(DrydockAuthorization $authorization) {
+ private function buildCurtain(DrydockAuthorization $authorization) {
$viewer = $this->getViewer();
$id = $authorization->getID();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer)
- ->setObject($authorization);
+ $curtain = $this->newCurtainView($authorization);
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
@@ -84,7 +85,7 @@
$can_authorize = $can_edit && ($state != $state_authorized);
$can_decline = $can_edit && ($state != $state_declined);
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref($authorize_uri)
->setName(pht('Approve Authorization'))
@@ -92,7 +93,7 @@
->setWorkflow(true)
->setDisabled(!$can_authorize));
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref($decline_uri)
->setName(pht('Decline Authorization'))
@@ -100,7 +101,7 @@
->setWorkflow(true)
->setDisabled(!$can_decline));
- return $view;
+ return $curtain;
}
private function buildPropertyListView(DrydockAuthorization $authorization) {
diff --git a/src/applications/drydock/controller/DrydockBlueprintViewController.php b/src/applications/drydock/controller/DrydockBlueprintViewController.php
--- a/src/applications/drydock/controller/DrydockBlueprintViewController.php
+++ b/src/applications/drydock/controller/DrydockBlueprintViewController.php
@@ -19,7 +19,8 @@
$header = id(new PHUIHeaderView())
->setHeader($title)
->setUser($viewer)
- ->setPolicyObject($blueprint);
+ ->setPolicyObject($blueprint)
+ ->setHeaderIcon('fa-map-o');
if ($blueprint->getIsDisabled()) {
$header->setStatus('fa-ban', 'red', pht('Disabled'));
@@ -27,15 +28,12 @@
$header->setStatus('fa-check', 'bluegrey', pht('Active'));
}
- $actions = $this->buildActionListView($blueprint);
- $properties = $this->buildPropertyListView($blueprint, $actions);
+ $curtain = $this->buildCurtain($blueprint);
+ $properties = $this->buildPropertyListView($blueprint);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Blueprint %d', $blueprint->getID()));
-
- $object_box = id(new PHUIObjectBoxView())
- ->setHeader($header)
- ->addPropertyList($properties);
+ $crumbs->setBorder(true);
$field_list = PhabricatorCustomField::getObjectFields(
$blueprint,
@@ -49,9 +47,8 @@
$viewer,
$properties);
- $resource_box = $this->buildResourceBox($blueprint);
-
- $authorizations_box = $this->buildAuthorizationsBox($blueprint);
+ $resources = $this->buildResourceBox($blueprint);
+ $authorizations = $this->buildAuthorizationsBox($blueprint);
$timeline = $this->buildTransactionTimeline(
$blueprint,
@@ -61,33 +58,36 @@
$log_query = id(new DrydockLogQuery())
->withBlueprintPHIDs(array($blueprint->getPHID()));
- $log_box = $this->buildLogBox(
+ $logs = $this->buildLogBox(
$log_query,
$this->getApplicationURI("blueprint/{$id}/logs/query/all/"));
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $object_box,
- $resource_box,
- $authorizations_box,
- $log_box,
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->addPropertySection(pht('Properties'), $properties)
+ ->setMainColumn(array(
+ $resources,
+ $authorizations,
+ $logs,
$timeline,
- ),
- array(
- 'title' => $title,
+ ));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild(
+ array(
+ $view,
));
}
- private function buildActionListView(DrydockBlueprint $blueprint) {
+ private function buildCurtain(DrydockBlueprint $blueprint) {
$viewer = $this->getViewer();
$id = $blueprint->getID();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer)
- ->setObject($blueprint);
-
+ $curtain = $this->newCurtainView($blueprint);
$edit_uri = $this->getApplicationURI("blueprint/edit/{$id}/");
$can_edit = PhabricatorPolicyFilter::hasCapability(
@@ -95,7 +95,7 @@
$blueprint,
PhabricatorPolicyCapability::CAN_EDIT);
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref($edit_uri)
->setName(pht('Edit Blueprint'))
@@ -113,7 +113,7 @@
$disable_uri = $this->getApplicationURI("blueprint/{$id}/enable/");
}
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref($disable_uri)
->setName($disable_name)
@@ -121,19 +121,15 @@
->setWorkflow(true)
->setDisabled(!$can_edit));
- return $view;
+ return $curtain;
}
private function buildPropertyListView(
- DrydockBlueprint $blueprint,
- PhabricatorActionListView $actions) {
+ DrydockBlueprint $blueprint) {
$viewer = $this->getViewer();
$view = id(new PHUIPropertyListView())
- ->setUser($viewer)
- ->setObject($blueprint);
-
- $view->setActionList($actions);
+ ->setUser($viewer);
$view->addProperty(
pht('Type'),
@@ -177,6 +173,7 @@
return id(new PHUIObjectBoxView())
->setHeader($resource_header)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($resource_list);
}
@@ -242,6 +239,7 @@
return id(new PHUIObjectBoxView())
->setHeader($authorizations_header)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($authorization_list);
}
diff --git a/src/applications/drydock/controller/DrydockController.php b/src/applications/drydock/controller/DrydockController.php
--- a/src/applications/drydock/controller/DrydockController.php
+++ b/src/applications/drydock/controller/DrydockController.php
@@ -102,6 +102,7 @@
->setText(pht('View All')));
return id(new PHUIObjectBoxView())
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setHeader($log_header)
->setTable($log_table);
}
diff --git a/src/applications/drydock/controller/DrydockLeaseViewController.php b/src/applications/drydock/controller/DrydockLeaseViewController.php
--- a/src/applications/drydock/controller/DrydockLeaseViewController.php
+++ b/src/applications/drydock/controller/DrydockLeaseViewController.php
@@ -21,53 +21,59 @@
$title = pht('Lease %d', $lease->getID());
$header = id(new PHUIHeaderView())
- ->setHeader($title);
+ ->setHeader($title)
+ ->setHeaderIcon('fa-link');
if ($lease->isReleasing()) {
$header->setStatus('fa-exclamation-triangle', 'red', pht('Releasing'));
}
- $actions = $this->buildActionListView($lease);
- $properties = $this->buildPropertyListView($lease, $actions);
+ $curtain = $this->buildCurtain($lease);
+ $properties = $this->buildPropertyListView($lease);
$log_query = id(new DrydockLogQuery())
->withLeasePHIDs(array($lease->getPHID()));
- $log_box = $this->buildLogBox(
+ $logs = $this->buildLogBox(
$log_query,
$this->getApplicationURI("lease/{$id}/logs/query/all/"));
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($title, $lease_uri);
+ $crumbs->setBorder(true);
$locks = $this->buildLocksTab($lease->getPHID());
$commands = $this->buildCommandsTab($lease->getPHID());
$object_box = id(new PHUIObjectBoxView())
- ->setHeader($header)
+ ->setHeaderText(pht('Properties'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->addPropertyList($properties, pht('Properties'))
->addPropertyList($locks, pht('Slot Locks'))
->addPropertyList($commands, pht('Commands'));
- return $this->buildApplicationPage(
- array(
- $crumbs,
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->setMainColumn(array(
$object_box,
- $log_box,
- ),
- array(
- 'title' => $title,
+ $logs,
+ ));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild(
+ array(
+ $view,
));
}
- private function buildActionListView(DrydockLease $lease) {
+ private function buildCurtain(DrydockLease $lease) {
$viewer = $this->getViewer();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer)
- ->setObject($lease);
-
+ $curtain = $this->newCurtainView($lease);
$id = $lease->getID();
$can_release = $lease->canRelease();
@@ -80,7 +86,7 @@
$lease,
PhabricatorPolicyCapability::CAN_EDIT);
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Release Lease'))
->setIcon('fa-times')
@@ -88,16 +94,14 @@
->setWorkflow(true)
->setDisabled(!$can_release || !$can_edit));
- return $view;
+ return $curtain;
}
private function buildPropertyListView(
- DrydockLease $lease,
- PhabricatorActionListView $actions) {
+ DrydockLease $lease) {
$viewer = $this->getViewer();
$view = new PHUIPropertyListView();
- $view->setActionList($actions);
$view->addProperty(
pht('Status'),
diff --git a/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php b/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php
--- a/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php
+++ b/src/applications/drydock/controller/DrydockRepositoryOperationViewController.php
@@ -25,50 +25,52 @@
$header = id(new PHUIHeaderView())
->setHeader($title)
->setUser($viewer)
- ->setPolicyObject($operation);
+ ->setPolicyObject($operation)
+ ->setHeaderIcon('fa-fighter-jet');
$state = $operation->getOperationState();
$icon = DrydockRepositoryOperation::getOperationStateIcon($state);
$name = DrydockRepositoryOperation::getOperationStateName($state);
$header->setStatus($icon, null, $name);
- $actions = $this->buildActionListView($operation);
+ $curtain = $this->buildCurtain($operation);
$properties = $this->buildPropertyListView($operation);
- $properties->setActionList($actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(
pht('Operations'),
$this->getApplicationURI('operation/'));
$crumbs->addTextCrumb($title);
-
- $object_box = id(new PHUIObjectBoxView())
- ->setHeader($header)
- ->addPropertyList($properties);
+ $crumbs->setBorder(true);
$status_view = id(new DrydockRepositoryOperationStatusView())
->setUser($viewer)
->setOperation($operation);
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->addPropertySection(pht('Properties'), $properties)
+ ->setMainColumn(array(
+ $status_view,
+ ));
+
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild(
array(
- $object_box,
- $status_view,
- ));
+ $view,
+ ));
}
- private function buildActionListView(DrydockRepositoryOperation $operation) {
+ private function buildCurtain(DrydockRepositoryOperation $operation) {
$viewer = $this->getViewer();
$id = $operation->getID();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer)
- ->setObject($operation);
+ $curtain = $this->newCurtainView($operation);
- return $view;
+ return $curtain;
}
private function buildPropertyListView(
diff --git a/src/applications/drydock/controller/DrydockResourceViewController.php b/src/applications/drydock/controller/DrydockResourceViewController.php
--- a/src/applications/drydock/controller/DrydockResourceViewController.php
+++ b/src/applications/drydock/controller/DrydockResourceViewController.php
@@ -23,14 +23,15 @@
$header = id(new PHUIHeaderView())
->setUser($viewer)
->setPolicyObject($resource)
- ->setHeader($title);
+ ->setHeader($title)
+ ->setHeaderIcon('fa-map');
if ($resource->isReleasing()) {
$header->setStatus('fa-exclamation-triangle', 'red', pht('Releasing'));
}
- $actions = $this->buildActionListView($resource);
- $properties = $this->buildPropertyListView($resource, $actions);
+ $curtain = $this->buildCurtain($resource);
+ $properties = $this->buildPropertyListView($resource);
$id = $resource->getID();
$resource_uri = $this->getApplicationURI("resource/{$id}/");
@@ -44,37 +45,42 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Resource %d', $resource->getID()));
+ $crumbs->setBorder(true);
$locks = $this->buildLocksTab($resource->getPHID());
$commands = $this->buildCommandsTab($resource->getPHID());
+ $lease_box = $this->buildLeaseBox($resource);
$object_box = id(new PHUIObjectBoxView())
- ->setHeader($header)
+ ->setHeaderText(pht('Properties'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->addPropertyList($properties, pht('Properties'))
->addPropertyList($locks, pht('Slot Locks'))
->addPropertyList($commands, pht('Commands'));
- $lease_box = $this->buildLeaseBox($resource);
-
- return $this->buildApplicationPage(
- array(
- $crumbs,
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setCurtain($curtain)
+ ->setMainColumn(array(
$object_box,
$lease_box,
$log_box,
- ),
- array(
- 'title' => $title,
+ ));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild(
+ array(
+ $view,
));
}
- private function buildActionListView(DrydockResource $resource) {
+ private function buildCurtain(DrydockResource $resource) {
$viewer = $this->getViewer();
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer)
- ->setObject($resource);
+ $curtain = $this->newCurtainView($resource);
$can_release = $resource->canRelease();
if ($resource->isReleasing()) {
@@ -89,7 +95,7 @@
$uri = '/resource/'.$resource->getID().'/release/';
$uri = $this->getApplicationURI($uri);
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setHref($uri)
->setName(pht('Release Resource'))
@@ -97,17 +103,14 @@
->setWorkflow(true)
->setDisabled(!$can_release || !$can_edit));
- return $view;
+ return $curtain;
}
private function buildPropertyListView(
- DrydockResource $resource,
- PhabricatorActionListView $actions) {
+ DrydockResource $resource) {
$viewer = $this->getViewer();
- $view = id(new PHUIPropertyListView())
- ->setActionList($actions);
-
+ $view = new PHUIPropertyListView();
$status = $resource->getStatus();
$status = DrydockResourceStatus::getNameForStatus($status);
@@ -179,6 +182,7 @@
return id(new PHUIObjectBoxView())
->setHeader($lease_header)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($lease_list);
}
diff --git a/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php b/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php
--- a/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php
+++ b/src/applications/drydock/view/DrydockRepositoryOperationStatusView.php
@@ -48,6 +48,7 @@
$box_view = $this->getBoxView();
if (!$box_view) {
$box_view = id(new PHUIObjectBoxView())
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setHeaderText(pht('Operation Status'));
}
$box_view->setObjectList($list);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 11:31 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6732645
Default Alt Text
D15467.id37284.diff (17 KB)
Attached To
Mode
D15467: Convert Drydock to two column layout
Attached
Detach File
Event Timeline
Log In to Comment