From 8dc65f554336541c0cd605e0fe6587dd2ca6bdd0 Mon Sep 17 00:00:00 2001 From: imamSidero Date: Tue, 15 Nov 2022 10:18:16 +0000 Subject: Provide tosca function to map values Providing the capability to add tosca function as the map values against it's key Issue-ID: SDC-4264 Signed-off-by: Imam hussain Change-Id: Ieaa49f9ac18b848bfd3996e9c6e08f9b4a32b999 --- .../tosca-get-function/tosca-get-function.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-get-function') 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 a32a4d0e45..0757e3d361 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 @@ -18,7 +18,7 @@ */ import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core'; -import {AttributeBEModel, ComponentMetadata, DataTypeModel, PropertyBEModel, PropertyModel, PropertyDeclareAPIModel} from 'app/models'; +import {AttributeBEModel, ComponentMetadata, DataTypeModel, PropertyBEModel, PropertyModel, PropertyDeclareAPIModel, DerivedFEProperty} from 'app/models'; import {TopologyTemplateService} from "../../../../services/component-services/topology-template.service"; import {WorkspaceService} from "../../../workspace/workspace.service"; import {PropertiesService} from "../../../../services/properties.service"; @@ -261,7 +261,7 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { } private propertyTypeToString() { - if (this.isSubProperty()){ + if (this.isSubProperty() && this.property.type != PROPERTY_TYPES.MAP){ return this.getType((this.property).propertiesName.split("#").slice(1), this.property.type); } if (this.property.schemaType) { @@ -367,6 +367,9 @@ export class ToscaGetFunctionComponent implements OnInit, OnChanges { private hasSameType(property: PropertyBEModel | AttributeBEModel): boolean { if (this.typeHasSchema(this.property.type)) { + if(this.property.type === PROPERTY_TYPES.MAP && this.property instanceof PropertyDeclareAPIModel && ( this.property).input instanceof DerivedFEProperty){ + return property.type === this.property.schema.property.type; + } if (!property.schema || !property.schema.property) { return false; } -- cgit 1.2.3-korg