diff options
author | andre.schmid <andre.schmid@est.tech> | 2022-06-14 12:01:07 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-06-20 15:57:04 +0000 |
commit | e398bb0eac655ea80507825ff039c874dd7dee6d (patch) | |
tree | fdf99c288406902cbe13adcc354f64dcf8d5c127 /catalog-ui | |
parent | ce3e2816ec3aa034bdef323c1a33b71485e87eb0 (diff) |
Fix VFC map or list property update
Fixes two problems in the update of VFC map or list properties. One was
related to a schema validation in the backend.
The other is related to setting the property value when the default
value was being edited.
Change-Id: Icd85346144c8763ced1b8fbcd750c9baf783f6a6
Issue-ID: SDC-4050
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui')
2 files changed, 2 insertions, 7 deletions
diff --git a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts index 2741c464c8..13460f50bf 100644 --- a/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts +++ b/catalog-ui/src/app/view-models/forms/property-forms/component-property-form/property-form-view-model.ts @@ -139,8 +139,7 @@ export class PropertyFormViewModel { private initResource = ():void => { this.$scope.editPropertyModel.property = new PropertyModel(this.property); this.$scope.editPropertyModel.property.type = this.property.type ? this.property.type : null; - this.$scope.editPropertyModel.property.value = this.$scope.editPropertyModel.property.value || this.$scope.editPropertyModel.property.defaultValue; - this.$scope.constraints = this.property.constraints && this.property.constraints[0] ? this.property.constraints[0]["validValues"] : null; + this.$scope.constraints = this.property.constraints && this.property.constraints[0] ? this.property.constraints[0]["validValues"] : null; this.initToscaGetFunction(); this.setMaxLength(); }; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts index 9794209757..b15901461a 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/properties/properties-view-model.ts @@ -73,14 +73,10 @@ export class PropertiesViewModel { } private openEditPropertyModal = (property:PropertyModel):void => { - this.ModalsHandler.openEditPropertyModal(property, this.$scope.component, this.$scope.filteredProperties, false, 'component', this.$scope.component.uniqueId).then((updatedProperty:PropertyModel) => { - //property = updatedProperty; - }); + this.ModalsHandler.openEditPropertyModal(property, this.$scope.component, this.$scope.filteredProperties, false, 'component', this.$scope.component.uniqueId); }; private initScope = ():void => { - - //let self = this; this.$scope.filteredProperties = this.$scope.component.properties; this.$scope.sortBy = 'name'; this.$scope.reverse = false; |