diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function/tosca-get-function.component.ts | 12 |
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()) { |