1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 13:30:55 +01:00

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:
epriestley 2012-12-12 07:36:53 -08:00
parent a7f4103f51
commit d1429488cd
2 changed files with 20 additions and 0 deletions

View file

@ -101,6 +101,16 @@ final class DrydockLeaseViewController extends DrydockController {
pht('Resource'),
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;
}

View file

@ -93,6 +93,16 @@ final class DrydockResourceViewController extends DrydockController {
pht('Resource Type'),
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;
}