Show lease and resource attributes in web view for Drydock
Summary: Show attributes on the view pages.
Test Plan: {F26985} {F26986}
Reviewers: btrahan, chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2015
Differential Revision: https://secure.phabricator.com/D4165
This commit is contained in:
@@ -101,6 +101,16 @@ final class DrydockLeaseViewController extends DrydockController {
|
|||||||
pht('Resource'),
|
pht('Resource'),
|
||||||
phutil_escape_html($lease->getResourceID()));
|
phutil_escape_html($lease->getResourceID()));
|
||||||
|
|
||||||
|
$attributes = $lease->getAttributes();
|
||||||
|
if ($attributes) {
|
||||||
|
$view->addSectionHeader(pht('Attributes'));
|
||||||
|
foreach ($attributes as $key => $value) {
|
||||||
|
$view->addProperty(
|
||||||
|
phutil_escape_html($key),
|
||||||
|
phutil_escape_html($value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,16 @@ final class DrydockResourceViewController extends DrydockController {
|
|||||||
pht('Resource Type'),
|
pht('Resource Type'),
|
||||||
phutil_escape_html($resource->getType()));
|
phutil_escape_html($resource->getType()));
|
||||||
|
|
||||||
|
$attributes = $resource->getAttributes();
|
||||||
|
if ($attributes) {
|
||||||
|
$view->addSectionHeader(pht('Attributes'));
|
||||||
|
foreach ($attributes as $key => $value) {
|
||||||
|
$view->addProperty(
|
||||||
|
phutil_escape_html($key),
|
||||||
|
phutil_escape_html($value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user