From fe4afd47955705bb377583649cb53e2cf4508493 Mon Sep 17 00:00:00 2001 From: talio Date: Sun, 14 Apr 2019 15:37:20 +0300 Subject: Declare properties as policies Change-Id: I54dc7b444e08117097c314cf5f51bd356ac5287d Issue-ID: SDC-2240 Signed-off-by: talio --- catalog-ui/src/app/models/graph/zones/policy-instance.ts | 2 ++ .../src/app/models/properties-inputs/property-be-model.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'catalog-ui/src/app/models') diff --git a/catalog-ui/src/app/models/graph/zones/policy-instance.ts b/catalog-ui/src/app/models/graph/zones/policy-instance.ts index c0a6678b21..cef1705a41 100644 --- a/catalog-ui/src/app/models/graph/zones/policy-instance.ts +++ b/catalog-ui/src/app/models/graph/zones/policy-instance.ts @@ -62,6 +62,7 @@ export class PolicyInstance implements IZoneInstanceMethod { iconSprite:string; icon:string; originArchived:boolean; + instanceUniqueId: string; constructor(policy?:PolicyInstance) { @@ -81,6 +82,7 @@ export class PolicyInstance implements IZoneInstanceMethod { this.targets = policy.targets; this.uniqueId = policy.uniqueId; this.version = policy.version; + this.instanceUniqueId = policy.instanceUniqueId; this.iconSprite = ''; this.icon = 'icon-policy'; diff --git a/catalog-ui/src/app/models/properties-inputs/property-be-model.ts b/catalog-ui/src/app/models/properties-inputs/property-be-model.ts index a1a85aa73d..15b9534b99 100644 --- a/catalog-ui/src/app/models/properties-inputs/property-be-model.ts +++ b/catalog-ui/src/app/models/properties-inputs/property-be-model.ts @@ -26,14 +26,26 @@ export enum DerivedPropertyType { MAP, COMPLEX } +export class PropertyPolicyDetail { + policyId: string; + propertyName: string; + constructor(propertyPolicy?:PropertyPolicyDetail) { + if(propertyPolicy) { + this.policyId = propertyPolicy.policyId; + this.propertyName = propertyPolicy.propertyName; + } + } +} export class PropertyBEModel { + constraints: Array; defaultValue: string; definition: boolean; description: string; fromDerived: boolean; getInputValues: Array; + getPolicyValues: Array; name: string; parentUniqueId: string; password: boolean; @@ -45,6 +57,7 @@ export class PropertyBEModel { value: string; parentPropertyType: string; subPropertyInputPath: string; + inputPath: string; constructor(property?: PropertyBEModel) { if (property) { @@ -65,6 +78,8 @@ export class PropertyBEModel { this.getInputValues = property.getInputValues; this.parentPropertyType = property.parentPropertyType; this.subPropertyInputPath = property.subPropertyInputPath; + this.getPolicyValues = property.getPolicyValues; + this.inputPath = property.inputPath; } if (!this.schema || !this.schema.property) { -- cgit 1.2.3-korg