diff options
author | 2018-03-20 21:31:56 +0530 | |
---|---|---|
committer | 2018-03-20 21:37:25 +0530 | |
commit | 36e91d5f969f22424509c112e154bdcdffa99521 (patch) | |
tree | f94d4c8aa5d32755326c73646d11b99898631516 /src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts | |
parent | 2ad624cfde8a529f539afcfd12ee28165e3bc939 (diff) |
Removing INSTAR functionality from CDT for ONAP.
Removed license form package.json.
Issue-ID: APPC-750
Change-Id: If20087a24fc0cf42977e1b1149d6be0ff1387689
Signed-off-by: Mohamed Asgar Samiulla(ma926a) <ma926a@us.att.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts')
-rw-r--r-- | src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts b/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts index cfcab03..2c13e4f 100644 --- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts +++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts @@ -63,7 +63,6 @@ export class ParameterDefinitionService { 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, @@ -307,21 +306,7 @@ export class ParameterDefinitionService { return result; } - //========================== End of clearSessionStorageForParam() Method============================================ - isValidateSourceAndResponseKeys(objs: any[]) { - let isValid = true; - if (undefined != objs || null != objs) { - for (var i = 0; i < objs.length; i++) { - if (objs[i].source == this.configurable_source && (null == objs[i]['response-keys'] || undefined == objs[i]['response-keys'])) { - isValid = false; - return isValid; - } - } - } - return isValid; - } - - + public prepareFileName(): any { let fileNameObject: any = this.mappingEditorService.latestAction; this.appDataObject = this.mappingEditorService.appDataObject; @@ -354,7 +339,6 @@ export class ParameterDefinitionService { jsonString = jsonString.replace(/"null"/g, 'null'); let saveModel = JSON.parse(jsonString); let pdFileObject = this.processResponseKeys(saveModel); - if (this.isValidateSourceAndResponseKeys(pdFileObject)) { let yamlObject = { 'kind': 'Property Definition', 'version': 'V1', @@ -379,14 +363,7 @@ export class ParameterDefinitionService { else { this.sendPD(JSON.stringify(yamlString)); } - } - else { - 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 '+this.configurable_source); - return; - } + //Restore Keys for display for (var i = 0; i < this.modelParamDefinitionObjects.length; i++) { this.formatKeys(this.modelParamDefinitionObjects[i]); @@ -434,18 +411,7 @@ export class ParameterDefinitionService { } parameterDefinitionObject['source'] = fields[0]; parameterDefinitionObject['rule-type'] = fields[1]; - } else { - if (parameterDefinitionObject['source'] === this.configurable_source) { - parameterDefinitionObject['source'] = 'Manual'; - parameterDefinitionObject['ruleTypeValues'] = [null]; - parameterDefinitionObject['rule-type'] = null; - parameterDefinitionObject['showFilterFields'] = false; - for (let x = 0; x < 5; x++) { - parameterDefinitionObject['response-keys'][x]['key-name'] = null; - parameterDefinitionObject['response-keys'][x]['key-value'] = null; - } - } - } + } this.formatKeys(parameterDefinitionObject); //Ensure there are 3 elements for response-keys, request-keys for display purposes if (!result.present) { //only push if not present this.modelParamDefinitionObjects.push(parameterDefinitionObject); |