List and map entries are rendered correctly on composition view
Issue-ID: SDC-4404
Signed-off-by: Imam hussain <imam.hussain@est.tech>
Change-Id: I3c640f51fceb96701296b5e561e45d65dcc599c3
<div data-ng-if="!isSchemaTypeDataType">
<div class="i-sdc-form-item list-new-item" data-ng-class="{error:(parentFormObj['listNewItem'+fieldsPrefixName].$dirty && parentFormObj['listNewItem'+fieldsPrefixName].$invalid)}"
ng-if="schemaProperty.type !== 'map'">
<div data-ng-if="!isSchemaTypeDataType">
<div class="i-sdc-form-item list-new-item" data-ng-class="{error:(parentFormObj['listNewItem'+fieldsPrefixName].$dirty && parentFormObj['listNewItem'+fieldsPrefixName].$invalid)}"
ng-if="schemaProperty.type !== 'map'">
- <form class="temp-form">
+ <form class="temp-form" data-ng-if="isService">
<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)" />
<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)" />
showToscaFunction: Array<boolean>;
constraints:string[];
types:DataTypesMap;
showToscaFunction: Array<boolean>;
constraints:string[];
types:DataTypesMap;
getValidationPattern(type:string):RegExp;
validateIntRange(value:string):boolean;
getValidationPattern(type:string):RegExp;
validateIntRange(value:string):boolean;
defaultValue: '@',//this list default value
maxLength: '=',
constraints: '=',
defaultValue: '@',//this list default value
maxLength: '=',
constraints: '=',
+ types: '=',
+ isService: '='
</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>
</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">
+ <form class="temp-form" data-ng-if="isService">
<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] == 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"/>
showAddBtn: boolean;
showToscaFunction: boolean[];
types: DataTypesMap;
showAddBtn: boolean;
showToscaFunction: boolean[];
types: DataTypesMap;
getValidationPattern(type: string): RegExp;
validateIntRange(value: string): boolean;
getValidationPattern(type: string): RegExp;
validateIntRange(value: string): boolean;
constraints: '=',
showAddBtn: '=?',
parentProperty: '=',
constraints: '=',
showAddBtn: '=?',
parentProperty: '=',
+ types: '=',
+ isService: '='
private initForNotSimpleType = ():void => {
const property = this.$scope.editPropertyModel.property;
private initForNotSimpleType = ():void => {
const property = this.$scope.editPropertyModel.property;
- this.$scope.isTypeDataType = this.isDataTypeForPropertyType(this.$scope.editPropertyModel.property);
+ this.$scope.isTypeDataType = this.DataTypesService.isDataTypeForPropertyType(this.$scope.editPropertyModel.property);
if (property.isToscaFunction()) {
this.initValueForGetFunction();
return;
if (property.isToscaFunction()) {
this.initValueForGetFunction();
return;
+ this.initForNotSimpleType();
this.initComponentInstanceMap();
this.$scope.validateJson = (json:string):boolean => {
this.initComponentInstanceMap();
this.$scope.validateJson = (json:string):boolean => {
this.$scope.nonPrimitiveTypes = _.filter(Object.keys(this.$scope.dataTypes), (type:string)=> {
return this.$scope.editPropertyModel.types.indexOf(type) == -1;
});
this.$scope.nonPrimitiveTypes = _.filter(Object.keys(this.$scope.dataTypes), (type:string)=> {
return this.$scope.editPropertyModel.types.indexOf(type) == -1;
});
- this.initForNotSimpleType();
this.$scope.isLoading = false;
});
this.$scope.isLoading = false;
});
default-value="{{getDefaultValue()}}"
max-length="maxLength"
types="dataTypes"
default-value="{{getDefaultValue()}}"
max-length="maxLength"
types="dataTypes"
+ is-service="!componentMetadata.isVfc"
constraints="editPropertyModel.property.constraints && editPropertyModel.property.constraints[0].validValues">
</type-map>
</div>
constraints="editPropertyModel.property.constraints && editPropertyModel.property.constraints[0].validValues">
</type-map>
</div>
default-value="{{getDefaultValue()}}"
max-length="maxLength"
types="dataTypes"
default-value="{{getDefaultValue()}}"
max-length="maxLength"
types="dataTypes"
+ is-service="!componentMetadata.isVfc"
constraints="editPropertyModel.property.constraints && editPropertyModel.property.constraints[0].validValues"></type-list>
</div>
constraints="editPropertyModel.property.constraints && editPropertyModel.property.constraints[0].validValues"></type-list>
</div>