diff options
author | imamSidero <imam.hussain@est.tech> | 2023-05-25 17:23:11 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2023-05-30 08:46:20 +0000 |
commit | 63f4c5920a6a3d07a79b0a546b72b5aebc189a68 (patch) | |
tree | 55034f0764b1d0709dd8b01c3ba06377bace000e /catalog-ui/src/app/directives | |
parent | 32d8a1dba11780a622b337e77830f9095f0767ee (diff) |
Bug fix on tosca function impact changes
Providing the required inputs and dependency changes for tosca functionality
Issue-ID: SDC-4510
Signed-off-by: Imam hussain <imam.hussain@est.tech>
Change-Id: Idf5af079c50bf2b9a09f572af30ca9fc294a831e
Diffstat (limited to 'catalog-ui/src/app/directives')
3 files changed, 20 insertions, 3 deletions
diff --git a/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.html b/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.html index 792919172e..78aa7bc7f4 100644 --- a/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.html +++ b/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.html @@ -33,9 +33,12 @@ <div data-ng-if="dataTypesService.isDataTypeForDataTypePropertyType(property)" class="inner-structure"> <fields-structure value-obj-ref="(valueObjRef[property.name])" type-name="property.type" + parent-property="parentProperty" + component-instance-map="componentInstanceMap" parent-form-obj="parentFormObj" fields-prefix-name="fieldsPrefixName+property.name" read-only="readOnly" + is-service="isService" default-value="{{currentTypeDefaultValue[property.name]}}"> </fields-structure> @@ -44,19 +47,25 @@ <div ng-switch-when="map"> <type-map value-obj-ref="valueObjRef[property.name]" schema-property="property.schema.property" + parent-property="property" + component-instance-map="componentInstanceMap" parent-form-obj="parentFormObj" fields-prefix-name="fieldsPrefixName+property.name" read-only="readOnly" default-value="{{currentTypeDefaultValue[property.name]}}" + is-service="isService" types="types"></type-map> </div> <div ng-switch-when="list"> <type-list value-obj-ref="valueObjRef[property.name]" schema-property="property.schema.property" + parent-property="parentProperty" + component-instance-map="componentInstanceMap" parent-form-obj="parentFormObj" fields-prefix-name="fieldsPrefixName+property.name" read-only="readOnly" default-value="{{currentTypeDefaultValue[property.name]}}" + is-service="isService" types="types"></type-list> </div> <div ng-switch-default class="primitive-value-field"> diff --git a/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.ts b/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.ts index 419ad2d9a6..30c7b06733 100644 --- a/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.ts +++ b/catalog-ui/src/app/directives/property-types/data-type-fields-structure/data-type-fields-structure.ts @@ -22,15 +22,18 @@ * Created by obarda on 1/27/2016. */ 'use strict'; -import { DataTypesMap } from 'app/models'; +import { DataTypesMap, PropertyModel } from 'app/models'; import { DataTypePropertyModel } from 'app/models/data-type-properties'; import { DataTypesService } from 'app/services'; import { ValidationUtils } from 'app/utils'; +import {InstanceFeDetails} from "app/models/instance-fe-details"; import * as _ from 'lodash'; export interface IDataTypeFieldsStructureScope extends ng.IScope { parentFormObj: ng.IFormController; dataTypeProperties: DataTypePropertyModel[]; + parentProperty:PropertyModel; + componentInstanceMap: Map<string, InstanceFeDetails>; typeName: string; valueObjRef: any; propertyNameValidationPattern: RegExp; @@ -43,6 +46,7 @@ export interface IDataTypeFieldsStructureScope extends ng.IScope { expanded: boolean; dataTypesService: DataTypesService; constraints: string[]; + isService:boolean; expandAndCollapse(): void; getValidationPattern(type: string): RegExp; @@ -58,12 +62,15 @@ export class DataTypeFieldsStructureDirective implements ng.IDirective { scope = { valueObjRef: '=', typeName: '=', + componentInstanceMap: '=', + parentProperty: '=', parentFormObj: '=', fieldsPrefixName: '=', readOnly: '=', defaultValue: '@', types: '=', - expandByDefault: '=' + expandByDefault: '=', + isService: '=' }; restrict = 'E'; diff --git a/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts b/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts index b2d322be1c..40a29da5fb 100644 --- a/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts +++ b/catalog-ui/src/app/directives/property-types/type-list/type-list-directive.ts @@ -123,7 +123,8 @@ export class TypeListDirective implements ng.IDirective { link = (scope:ITypeListScope, element:any, $attr:any) => { scope.propertyNameValidationPattern = this.PropertyNameValidationPattern; scope.stringSchema = this.stringSchema; - if (scope.valueObjRef.length == 0) { + if (scope.valueObjRef == null || scope.valueObjRef.length == 0) { + scope.valueObjRef = []; scope.valueObjRef.push(""); } scope.showToscaFunction = new Array(scope.valueObjRef.length); |