<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)" />
showToscaFunction: Array<boolean>;
constraints:string[];
types:DataTypesMap;
+ isService:boolean;
getValidationPattern(type:string):RegExp;
validateIntRange(value:string):boolean;
defaultValue: '@',//this list default value
maxLength: '=',
constraints: '=',
- types: '='
+ types: '=',
+ isService: '='
};
restrict = 'E';
</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"/>
showAddBtn: boolean;
showToscaFunction: boolean[];
types: DataTypesMap;
+ isService: boolean;
getValidationPattern(type: string): RegExp;
validateIntRange(value: string): boolean;
constraints: '=',
showAddBtn: '=?',
parentProperty: '=',
- types: '='
+ types: '=',
+ isService: '='
};
restrict = 'E';
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;
}
}
this.initResource();
+ this.initForNotSimpleType();
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.initForNotSimpleType();
this.$scope.isLoading = false;
});
default-value="{{getDefaultValue()}}"
max-length="maxLength"
types="dataTypes"
+ is-service="!componentMetadata.isVfc"
constraints="editPropertyModel.property.constraints && editPropertyModel.property.constraints[0].validValues">
</type-map>
</div>
default-value="{{getDefaultValue()}}"
max-length="maxLength"
types="dataTypes"
+ is-service="!componentMetadata.isVfc"
constraints="editPropertyModel.property.constraints && editPropertyModel.property.constraints[0].validValues"></type-list>
</div>