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 | 16 |
1 files changed, 9 insertions, 7 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 84018fd546..9fdc8c19aa 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 @@ -45,6 +45,8 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { @Input() toscaGetFunction: ToscaGetFunction; @Input() componentInstanceMap: Map<string, InstanceFeDetails> = new Map<string, InstanceFeDetails>(); @Input() functionType: ToscaGetFunctionType; + @Input() compositionMap: boolean; + @Input() compositionMapKey: string; @Output() onValidFunction: EventEmitter<ToscaGetFunction> = new EventEmitter<ToscaGetFunction>(); @Output() onValidityChange: EventEmitter<ToscaGetFunctionValidationEvent> = new EventEmitter<ToscaGetFunctionValidationEvent>(); @@ -262,10 +264,10 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { private propertyTypeToString() { if (this.isSubProperty()){ - if (this.typeHasSchema(this.property.type) && this.property instanceof PropertyDeclareAPIModel && - (<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) { - if(this.isComplexType(this.property.schemaType)){ - return this.property.input.type; + if ((this.typeHasSchema(this.property.type) && this.property instanceof PropertyDeclareAPIModel && + (<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) || this.compositionMap) { + if(this.isComplexType(this.property.schemaType) && !this.compositionMap){ + return (<PropertyDeclareAPIModel> this.property).input.type; }else{ return this.property.schema.property.type; } @@ -375,9 +377,9 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { private hasSameType(property: PropertyBEModel | AttributeBEModel): boolean { if (this.typeHasSchema(this.property.type)) { - if (this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) { - if(this.isComplexType(this.property.schemaType)){ - return property.type === this.property.input.type; + if ((this.property instanceof PropertyDeclareAPIModel && (<PropertyDeclareAPIModel> this.property).input instanceof DerivedFEProperty) || this.compositionMap) { + if(this.isComplexType(this.property.schemaType) && !this.compositionMap){ + return property.type === (<PropertyDeclareAPIModel> this.property).input.type; }else{ return property.type === this.property.schema.property.type; } |