summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html
diff options
context:
space:
mode:
authorimamSidero <imam.hussain@est.tech>2023-01-11 18:13:25 +0000
committerMichael Morris <michael.morris@est.tech>2023-01-13 13:22:26 +0000
commita8d208b231237fc9f05f83c2b33fa207d58f1480 (patch)
treee58cac7c4a5e81e5fd042ed244539d4981947434 /catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html
parentaa92493c97b43075c18696d79f7d1bf62aa4805a (diff)
Provide tosca function as map primitive type entry values in composition view
Providing the capability to add tosca function as the primitive type entry values of map in composition view Issue-ID: SDC-4319 Signed-off-by: Imam hussain <imam.hussain@est.tech> Change-Id: I5cf67bc94ac5c72be6a962e07160329cd07d302c
Diffstat (limited to 'catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html')
-rw-r--r--catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html21
1 files changed, 18 insertions, 3 deletions
diff --git a/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html b/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html
index d84ec821de..5c895115e5 100644
--- a/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html
+++ b/catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html
@@ -41,9 +41,14 @@
</div>
<div data-ng-if="!isSchemaTypeDataType" class="i-sdc-form-item map-item-field" data-ng-class="{error:(parentFormObj['mapValue'+fieldsPrefixName+$index].$dirty && parentFormObj['mapValue'+fieldsPrefixName+$index].$invalid)}">
<label class="i-sdc-form-label required">Value</label>
-
+ <form class="temp-form">
+ <input type="radio" name="hasToscaFunction-{{fieldsPrefixName}}-{{$index}}" data-ng-checked="{{showToscaFunction[$index] == false}}" data-ng-click="onEnableTosca(false,$index)"/>
+ Value
+ <input type="radio" name="hasToscaFunction-{{fieldsPrefixName}}-{{$index}}" data-ng-checked="{{showToscaFunction[$index]}}" data-ng-click="onEnableTosca(true,$index)" ng-disabled="mapKeys[$index] == '' || mapKeys[$index] == null"/>
+ {{'TOSCA_FUNCTION_LABEL' | translate}}
+ </form>
<input class="i-sdc-form-input"
- ng-if="!constraints && !((schemaProperty.simpleType||schemaProperty.type) == 'boolean')"
+ ng-if="!constraints && !((schemaProperty.simpleType||schemaProperty.type) == 'boolean') && showToscaFunction[$index] == false"
data-ng-readonly="readOnly"
data-ng-model="valueObjRef[mapKeys[$index]]"
type="text"
@@ -58,7 +63,7 @@
autofocus />
<select class="i-sdc-form-select"
data-tests-id="mapValue{{fieldsPrefixName}}{{$index}}"
- ng-if="!constraints && (schemaProperty.simpleType||schemaProperty.type) == 'boolean'"
+ ng-if="!constraints && (schemaProperty.simpleType||schemaProperty.type) == 'boolean' && showToscaFunction[$index] == false"
data-ng-disabled="readOnly"
name="mapValue{{fieldsPrefixName}}{{$index}}"
data-ng-model="valueObjRef[mapKeys[$index]]"
@@ -66,6 +71,16 @@
<option value="true">true</option>
<option value="false">false</option>
</select>
+ <div data-ng-if="showToscaFunction[$index]" class="div-tosca-function">
+ <tosca-function [property]="parentProperty"
+ [component-instance-map]="componentInstanceMap"
+ [allow-clear]="false"
+ [composition-map]="true"
+ [composition-map-key]="mapKeys[$index]"
+ (on-valid-function)="onGetToscaFunction($event,mapKeys[$index])"
+ >
+ </tosca-function>
+ </div>
<select class="i-sdc-form-select"