private selectedActionReference: any;
private apiToken = localStorage['apiToken'];
private userId = localStorage['userId'];
-
+ public configurable_source = require('../../../CDTProperties.json').source;
constructor(private mappingEditorService: MappingEditorService,
private paramShareService: ParamShareService,
private nService: NotificationsService,
private httpService: HttpUtilService,
private utilService: UtilityService) {
-
}
public initialize() {
let isValid = true;
if (undefined != objs || null != objs) {
for (var i = 0; i < objs.length; i++) {
- if (objs[i].source == 'INSTAR' && (null == objs[i]['response-keys'] || undefined == objs[i]['response-keys'])) {
+ if (objs[i].source == this.configurable_source && (null == objs[i]['response-keys'] || undefined == objs[i]['response-keys'])) {
isValid = false;
return isValid;
}
jsonString = jsonString.replace(/"null"/g, 'null');
let saveModel = JSON.parse(jsonString);
let pdFileObject = this.processResponseKeys(saveModel);
- //Validate for Source =INSTAR and responsekeys present
if (this.isValidateSourceAndResponseKeys(pdFileObject)) {
let yamlObject = {
'kind': 'Property Definition',
for (var i = 0; i < this.modelParamDefinitionObjects.length; i++) {
this.formatKeys(this.modelParamDefinitionObjects[i]);
}
- this.nService.error('Error', 'Response Keys cannot be empty if source is INSTAR');
+ this.nService.error('Error', 'Response Keys cannot be empty if source is '+this.configurable_source);
return;
}
//Restore Keys for display
parameterDefinitionObject['source'] = fields[0];
parameterDefinitionObject['rule-type'] = fields[1];
} else {
- if (parameterDefinitionObject['source'] === 'INSTAR') {
+ if (parameterDefinitionObject['source'] === this.configurable_source) {
parameterDefinitionObject['source'] = 'Manual';
parameterDefinitionObject['ruleTypeValues'] = [null];
parameterDefinitionObject['rule-type'] = null;
}
]
};
+ public configurable_source = require('../../../CDTProperties.json').source;
public requiredValues: boolean[] = [null, true, false];
- public sourceValues = ['Manual', 'INSTAR', 'A&AI'];
+ public sourceValues = ['Manual', this.configurable_source, 'A&AI'];
public ruleTypeValues = [null, 'vnf-name', 'vm-name-list', 'vnfc-name-list', 'vnf-oam-ipv4-address', 'vnfc-oam-ipv4-address-list'];
public typeValues = [null, 'ipv4-address', 'ipv6-address', 'ipv4-prefix', 'ipv6-prefix'];
public responseKeyNameValues = ['', 'unique-key-name', 'unique-key-value', 'field-key-name'];
identifier: any;
private selectedActionReference: any;
- //this.mappingeditorservice.referenceNameObjects = object;PLEASE USE THIS OBJECT TO GET TEMPALLDATA
-
constructor (private httpService: HttpUtilService,
private parameterDefinitionService: ParameterDefinitionService,
private paramShareService: ParamShareService,
};
}
- //let path = this.location.path
- /* this.activeRoutes.url.subscribe(UrlSegment => {
- this.actionType = UrlSegment[0].path
- })
- */
this.identifier = this.mappingEditorService.identifier;
}
// callback with the results
callback(reader.result);
};
- //this.notificationService.notifySuccessMessage('Uploading File ' + file.name + ':' + file.type + ':' + file.size);
// Read the file
reader.readAsText(file, 'UTF-8');
}