Page MenuHomePhabricator

D10873.id33768.diff
No OneTemporary

D10873.id33768.diff

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
@@ -115,9 +115,20 @@
pht('Resource Type'),
$lease->getResourceType());
- $view->addProperty(
- pht('Resource'),
- $lease->getResourceID());
+ $resource = id(new DrydockResourceQuery())
+ ->setViewer($this->getViewer())
+ ->withIDs(array($lease->getResourceID()))
+ ->executeOne();
+
+ if ($resource !== null) {
+ $view->addProperty(
+ pht('Resource'),
+ $this->getViewer()->renderHandle($resource->getPHID()));
+ } else {
+ $view->addProperty(
+ pht('Resource'),
+ pht('No Resource'));
+ }
$attributes = $lease->getAttributes();
if ($attributes) {
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
@@ -110,10 +110,9 @@
pht('Resource Type'),
$resource->getType());
- // TODO: Load handle.
$view->addProperty(
pht('Blueprint'),
- $resource->getBlueprintPHID());
+ $this->getViewer()->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,10 @@
$blueprint = $objects[$phid];
$id = $blueprint->getID();
+ $handle->setName(pht(
+ 'Blueprint %d: %s',
+ $id,
+ $blueprint->getBlueprintName()));
$handle->setURI("/drydock/blueprint/{$id}/");
}
}
diff --git a/src/applications/drydock/phid/DrydockResourcePHIDType.php b/src/applications/drydock/phid/DrydockResourcePHIDType.php
--- a/src/applications/drydock/phid/DrydockResourcePHIDType.php
+++ b/src/applications/drydock/phid/DrydockResourcePHIDType.php
@@ -29,7 +29,10 @@
$resource = $objects[$phid];
$id = $resource->getID();
- $handle->setName($resource->getName());
+ $handle->setName(pht(
+ 'Resource %d: %s',
+ $id,
+ $resource->getName()));
$handle->setURI("/drydock/resource/{$id}/");
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, May 11, 2:35 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6286275
Default Alt Text
D10873.id33768.diff (2 KB)

Event Timeline