aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/models')
-rw-r--r--catalog-ui/src/app/models/properties-inputs/property-be-model.ts2
-rw-r--r--catalog-ui/src/app/models/properties.ts8
2 files changed, 9 insertions, 1 deletions
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 b4c1c2fce7..ae72977b80 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
@@ -71,6 +71,7 @@ export class PropertyBEModel {
inputPath: string;
toscaPresentation: ToscaPresentationData;
metadata: Metadata;
+ propertyConstraints: any;
/**
* @deprecated Use toscaFunction instead
*/
@@ -81,6 +82,7 @@ export class PropertyBEModel {
constructor(property?: PropertyBEModel) {
if (property) {
this.constraints = property.constraints;
+ this.propertyConstraints = property.propertyConstraints;
this.defaultValue = property.defaultValue;
this.description = property.description;
this.fromDerived = property.fromDerived;
diff --git a/catalog-ui/src/app/models/properties.ts b/catalog-ui/src/app/models/properties.ts
index 80575c4221..cff1324c30 100644
--- a/catalog-ui/src/app/models/properties.ts
+++ b/catalog-ui/src/app/models/properties.ts
@@ -94,7 +94,13 @@ export class PropertyModel extends PropertyBEModel implements IPropertyModel {
constructor(property?:PropertyModel) {
super(property);
if (property) {
- this.constraints = property.constraints;
+ if (property.propertyConstraints) {
+ this.constraints = new Array();
+ property.propertyConstraints.forEach((constraint: any) => {
+ this.constraints.push(JSON.parse(constraint));
+ });
+ }
+ this.propertyConstraints = property.propertyConstraints;
this.source = property.source;
this.valueUniqueUid = property.valueUniqueUid;
this.path = property.path;