summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-06-23 17:26:51 +0000
committerMichaelMorris <michael.morris@est.tech>2023-06-23 18:39:31 +0100
commit86dc4e7f69e6a05277e123391649fa3f4f7b83a5 (patch)
tree6f3944bbcc2539f377f78262240a4947080ac87d /catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
parentfc3869ca4c430cc29e46bb42125f5672230b83f0 (diff)
Revert "Provide tosca function capability to complex type fields in composition view"
This reverts commit fc3869ca4c430cc29e46bb42125f5672230b83f0. Reason for revert: Looks to be causing an issue with setting node filter using custom tosca function (save button disbaled) Change-Id: I684aae7a23d30ed5a20aa4630cd658997b4628a5 Issue-ID: SDC-4528 Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
index 792d9cba60..34ed9a618d 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
@@ -82,6 +82,7 @@ export class ToscaFunctionComponent implements OnInit, OnChanges {
if (!this.isInitialized) {
return;
}
+ this.emitValidityChange();
if (this.formGroup.valid) {
this.onValidFunction.emit(this.toscaFunctionForm.value);
}
@@ -110,12 +111,12 @@ export class ToscaFunctionComponent implements OnInit, OnChanges {
let keyToFind = [this.compositionMapKey];
let subPropertyToscaFunction = this.property.subPropertyToscaFunctions.find(subPropertyToscaFunction => this.areEqual(subPropertyToscaFunction.subPropertyPath, keyToFind));
- if (subPropertyToscaFunction){
- this.toscaFunction = subPropertyToscaFunction.toscaFunction;
- this.toscaFunctionForm.setValue(this.toscaFunction);
- this.toscaFunctionTypeForm.setValue(this.toscaFunction.type);
- }
- return;
+ if (subPropertyToscaFunction){
+ this.toscaFunction = subPropertyToscaFunction.toscaFunction;
+ this.toscaFunctionForm.setValue(this.toscaFunction);
+ this.toscaFunctionTypeForm.setValue(this.toscaFunction.type);
+ }
+ return;
}
if (this.property instanceof PropertyDeclareAPIModel && this.property.subPropertyToscaFunctions && (<PropertyDeclareAPIModel> this.property).propertiesName){
let propertiesPath = (<PropertyDeclareAPIModel> this.property).propertiesName.split("#");
@@ -266,7 +267,6 @@ export class ToscaFunctionComponent implements OnInit, OnChanges {
} else {
this.toscaFunctionForm.setValue(undefined);
}
- this.emitValidityChange();
}
onYamlFunctionValidityChange(validationEvent: YamlFunctionValidationEvent): void {