Restructure Drydock so that blueprints are instances in the DB
Summary: //(this diff used to be about applying policies to blueprints)// This restructures Drydock so that blueprints are instances in the DB, with an associated implementation class. Thus resources now have a `blueprintPHID` instead of `blueprintClass` and DrydockBlueprint becomes a DAO. The old DrydockBlueprint is renamed to DrydockBlueprintImplementation, and the DrydockBlueprint DAO has a `blueprintClass` column on it. This now just implements CAN_VIEW and CAN_EDIT policies for blueprints, although they are probably not enforced in all of the places they could be. Test Plan: Used the `create-resource` and `lease` commands. Closed resources and leases in the UI. Clicked around the new and old lists to make sure everything is still working. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Maniphest Tasks: T4111, T2015 Differential Revision: https://secure.phabricator.com/D7638
This commit is contained in:
@@ -33,9 +33,6 @@ final class DrydockResourceViewController extends DrydockController {
|
||||
->needResources(true)
|
||||
->execute();
|
||||
|
||||
$lease_header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Leases'));
|
||||
|
||||
$lease_list = $this->buildLeaseListView($leases);
|
||||
$lease_list->setNoDataString(pht('This resource has no leases.'));
|
||||
|
||||
@@ -64,7 +61,6 @@ final class DrydockResourceViewController extends DrydockController {
|
||||
array(
|
||||
$crumbs,
|
||||
$object_box,
|
||||
$lease_header,
|
||||
$lease_list,
|
||||
$log_table,
|
||||
),
|
||||
@@ -114,6 +110,11 @@ final class DrydockResourceViewController extends DrydockController {
|
||||
pht('Resource Type'),
|
||||
$resource->getType());
|
||||
|
||||
// TODO: Load handle.
|
||||
$view->addProperty(
|
||||
pht('Blueprint'),
|
||||
$resource->getBlueprintPHID());
|
||||
|
||||
$attributes = $resource->getAttributes();
|
||||
if ($attributes) {
|
||||
$view->addSectionHeader(pht('Attributes'));
|
||||
|
||||
Reference in New Issue
Block a user