aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2023-07-04 14:45:53 +0100
committerMichael Morris <michael.morris@est.tech>2023-10-11 14:22:03 +0000
commit0d9d05e705a6fbc9c4370fdd3a8ad543d04f8210 (patch)
tree92031d3d2bd92288686fb4c156cbbe02e64389ab /catalog-ui/src/app/ng2/pages/properties-assignment
parent98513d2be1f1c5f0fba48a972dea297b784aec68 (diff)
No properties found when trying to add a node filter to a VF
Issue-ID: SDC-4607 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I5df11e156f4bc20ff1d4f19b7af8dfe798631077
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
index 67df3e46e1..8c84c0e1a8 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts
@@ -33,6 +33,7 @@ import {InstanceFeDetails} from "../../../../../models/instance-fe-details";
import {ToscaGetFunction} from "../../../../../models/tosca-get-function";
import {FormControl, FormGroup, Validators} from "@angular/forms";
import {ToscaGetFunctionTypeConverter} from "../../../../../models/tosca-get-function-type-converter";
+import {ResourceType} from "app/utils";
@Component({
selector: 'app-tosca-get-function',
@@ -367,6 +368,10 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
if (this.isPropertySourceSelf()) {
return componentGenericResponse.properties;
}
+ let componentInstanceInput = componentGenericResponse.componentInstances.find(compInst => this.isInput(compInst.originType) && compInst.uniqueId === instanceId);
+ if ( componentInstanceInput) {
+ return this.removeSelectedProperty(componentGenericResponse.componentInstancesInputs[instanceId]);
+ }
return this.removeSelectedProperty(componentGenericResponse.componentInstancesProperties[instanceId]);
}
if (this.isPropertySourceSelf()) {
@@ -376,6 +381,10 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
...(componentGenericResponse.componentInstancesProperties[instanceId] || [])];
}
+ private isInput (instanceType:string): boolean {
+ return instanceType === ResourceType.VF || instanceType === ResourceType.PNF || instanceType === ResourceType.CVFC || instanceType === ResourceType.CR;
+ }
+
private isPropertySourceSelf() {
return this.propertySource.value === PropertySource.SELF;
}
@@ -388,7 +397,8 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges {
if (this.isPropertySourceSelf()) {
return this.topologyTemplateService.findAllComponentProperties(this.componentMetadata.componentType, this.componentMetadata.uniqueId);
}
- return this.topologyTemplateService.getComponentInstanceProperties(this.componentMetadata.componentType, this.componentMetadata.uniqueId);
+ return this.topologyTemplateService.getComponentInstancesAndInputsAndProperties(this.componentMetadata.componentType, this.componentMetadata.uniqueId);
+ // return this.topologyTemplateService.getComponentInstanceInputsAndProperties(this.componentMetadata.componentType, this.componentMetadata.uniqueId);
}
if (this.isGetAttribute()) {
if (this.isPropertySourceSelf()) {