Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18085213
D14119.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D14119.diff
View Options
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
@@ -61,6 +61,10 @@
$viewer,
$properties);
+ $resource_box = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Resources'))
+ ->setObjectList($resource_list);
+
$timeline = $this->buildTransactionTimeline(
$blueprint,
new DrydockBlueprintTransactionQuery());
@@ -70,7 +74,7 @@
array(
$crumbs,
$object_box,
- $resource_list,
+ $resource_box,
$timeline,
),
array(
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
@@ -8,4 +8,32 @@
return $this->buildSideNavView()->getMenu();
}
+ protected function buildLocksTab($owner_phid) {
+ $locks = DrydockSlotLock::loadLocks($owner_phid);
+
+ $rows = array();
+ foreach ($locks as $lock) {
+ $rows[] = array(
+ $lock->getID(),
+ $lock->getLockKey(),
+ );
+ }
+
+ $table = id(new AphrontTableView($rows))
+ ->setNoDataString(pht('No slot locks held.'))
+ ->setHeaders(
+ array(
+ pht('ID'),
+ pht('Lock Key'),
+ ))
+ ->setColumnClasses(
+ array(
+ null,
+ 'wide',
+ ));
+
+ return id(new PHUIPropertyListView())
+ ->addRawContent($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
@@ -42,18 +42,25 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($title, $lease_uri);
+ $locks = $this->buildLocksTab($lease->getPHID());
+
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->addPropertyList($properties);
+ ->addPropertyList($properties, pht('Properties'))
+ ->addPropertyList($locks, pht('Slot Locks'));
+
+ $log_box = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Lease Logs'))
+ ->setTable($log_table);
return $this->buildApplicationPage(
array(
$crumbs,
$object_box,
- $log_table,
+ $log_box,
),
array(
- 'title' => $title,
+ 'title' => $title,
));
}
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
@@ -54,16 +54,27 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Resource %d', $resource->getID()));
+ $locks = $this->buildLocksTab($resource->getPHID());
+
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->addPropertyList($properties);
+ ->addPropertyList($properties, pht('Properties'))
+ ->addPropertyList($locks, pht('Slot Locks'));
+
+ $lease_box = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Leases'))
+ ->setObjectList($lease_list);
+
+ $log_box = id(new PHUIObjectBoxView())
+ ->setHeaderText(pht('Resource Logs'))
+ ->setTable($log_table);
return $this->buildApplicationPage(
array(
$crumbs,
$object_box,
- $lease_list,
- $log_table,
+ $lease_box,
+ $log_box,
),
array(
'title' => $title,
@@ -95,6 +106,7 @@
private function buildPropertyListView(
DrydockResource $resource,
PhabricatorActionListView $actions) {
+ $viewer = $this->getViewer();
$view = new PHUIPropertyListView();
$view->setActionList($actions);
@@ -110,10 +122,9 @@
pht('Resource Type'),
$resource->getType());
- // TODO: Load handle.
$view->addProperty(
pht('Blueprint'),
- $resource->getBlueprintPHID());
+ $viewer->renderHandle($resource->getBlueprintPHID()));
$attributes = $resource->getAttributes();
if ($attributes) {
diff --git a/src/applications/drydock/phid/DrydockBlueprintPHIDType.php b/src/applications/drydock/phid/DrydockBlueprintPHIDType.php
--- a/src/applications/drydock/phid/DrydockBlueprintPHIDType.php
+++ b/src/applications/drydock/phid/DrydockBlueprintPHIDType.php
@@ -29,6 +29,7 @@
$blueprint = $objects[$phid];
$id = $blueprint->getID();
+ $handle->setName($blueprint->getBlueprintName());
$handle->setURI("/drydock/blueprint/{$id}/");
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 6, 7:03 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9029992
Default Alt Text
D14119.diff (4 KB)
Attached To
Mode
D14119: Tidy up some Drydock UI
Attached
Detach File
Event Timeline
Log In to Comment