diff options
author | 2023-02-07 17:27:13 +0000 | |
---|---|---|
committer | 2023-02-24 14:23:26 +0000 | |
commit | 287b5c443f135bee69a9b32919f481ec40495dbf (patch) | |
tree | eb7e17594cfb7a300fb7a0a735551c98fa55c158 /catalog-ui/src/app/directives/property-types/type-map/type-map-directive.html | |
parent | 5526028d3bc464937c9a4373a7fc6e577d781cad (diff) |
Fix handling of default values for VFC properties
Issue-ID: SDC-4375
Signed-off-by: eschcam <cameron.scholes@est.tech>
Change-Id: Icb3c1dbbf52266c2021c50f491a7e48efdfb9e55
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.html | 14 |
1 files changed, 7 insertions, 7 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 b4ac6aae1e..a2b742492d 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 @@ -13,10 +13,10 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + + <div class="type-map"> - <div data-ng-repeat="i in getNumber(mapKeys.length) track by $index" class="map-item" data-ng-class="{'primitive-value-map':!isSchemaTypeDataType}"> + <div ng-if="mapKeys.length > 0" data-ng-repeat="i in getNumber(mapKeys.length) track by $index" class="map-item" data-ng-class="{'primitive-value-map':!isSchemaTypeDataType}"> <div class="i-sdc-form-item map-item-field" data-ng-class="{error:(parentFormObj['mapKey'+fieldsPrefixName+$index].$dirty && parentFormObj['mapKey'+fieldsPrefixName+$index].$invalid)}"> <label class="i-sdc-form-label required">Key</label> <input class="i-sdc-form-input" @@ -42,9 +42,9 @@ <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)"/> + <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"/> + <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" @@ -92,11 +92,11 @@ <!-- Get the saved value for the relevant key --> <option ng-if = "valueObjRef[mapKeys[$index]]" value = "{{valueObjRef[mapKeys[$index]]}}" name = "{{valueObjRef[mapKeys[$index]]}}" hidden selected> {{valueObjRef[mapKeys[$index]]}} - </option> + </option> <!-- add all constratint to Select list --> <option ng-repeat='value in constraints' value="{{value}}" name="{{value}}"> {{value}} - </option> + </option> </select> <div class="input-error" data-ng-show="parentFormObj['mapValue'+fieldsPrefixName+$index].$dirty && parentFormObj['mapValue'+fieldsPrefixName+$index].$invalid"> |