summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2023-02-23 10:46:25 +0000
committerfranciscovila <javier.paradela.vila@est.tech>2023-03-13 12:05:26 +0000
commit7193e96b30ccaa4ed06c80a4861c91d341e0d910 (patch)
treed4b3f0bc7dde9d8ab9c2dbab9dabb6b9008feb32 /catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
parent532cb373b22b5684cbe6ea003d749560f051be08 (diff)
Setting Tosca Function on top of unsaved value causes problems
Issue-ID: SDC-4405 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: I688fafa39338900f6248213c27975ced113f5ee9
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
index f1404d37f9..ada12ad2e2 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
@@ -364,6 +364,8 @@ export class PropertiesAssignmentComponent {
//clear selected property from the navigation
this.selectedFlatProperty = new SimpleFlatProperty();
this.propertiesNavigationData = [];
+ this.checkedToscaCount = 0;
+ this.enableToscaFunction = false;
};
/**
@@ -626,6 +628,13 @@ export class PropertiesAssignmentComponent {
}
}
if (this.selectedInstanceData instanceof ComponentInstance) {
+ var toRemove = this.changedData.filter(obj => {
+ return obj.name == checkedInstanceProperty.name && obj.type == checkedInstanceProperty.type && obj.value == null;
+ });
+ const index: number = this.changedData.indexOf(toRemove[0]);
+ if (index !== -1) {
+ this.changedData.splice(index, 1);
+ }
this.updateInstanceProperty(checkedInstanceProperty);
} else if (this.selectedInstanceData instanceof GroupInstance) {
this.updateGroupInstanceProperty(checkedInstanceProperty);
@@ -689,6 +698,7 @@ export class PropertiesAssignmentComponent {
this.loadingProperties = true;
this.enableToscaFunction = false;
this.checkedToscaCount = 0;
+
this.componentInstanceServiceNg2.updateInstanceProperties(this.component.componentType, this.component.uniqueId,
this.selectedInstanceData.uniqueId, [instanceProperty])
.subscribe(() => {