summaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts/parameter-definitions
diff options
context:
space:
mode:
authorMohamed Asgar Samiulla(ma926a) <ma926a@us.att.com>2018-03-20 21:31:56 +0530
committerMohamed Asgar Samiulla(ma926a) <ma926a@us.att.com>2018-03-20 21:37:25 +0530
commit36e91d5f969f22424509c112e154bdcdffa99521 (patch)
treef94d4c8aa5d32755326c73646d11b99898631516 /src/app/vnfs/build-artifacts/parameter-definitions
parent2ad624cfde8a529f539afcfd12ee28165e3bc939 (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')
-rw-r--r--src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts40
-rw-r--r--src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.html2
-rw-r--r--src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts7
3 files changed, 5 insertions, 44 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);
diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.html b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.html
index 1130c94..74c503a 100644
--- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.html
+++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.html
@@ -135,7 +135,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<option *ngFor="let src of sourceValues"
[value]="src"
[selected]="src === obj.source"
- [disabled]="src === configurable_source">
+ >
{{src}}
</option>
diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts
index ea22634..effd854 100644
--- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts
+++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts
@@ -122,9 +122,8 @@ export class ParameterComponent implements OnInit {
}
]
};
- public configurable_source = require('../../../CDTProperties.json').source;
public requiredValues: boolean[] = [null, true, false];
- public sourceValues = ['Manual', this.configurable_source, 'A&AI'];
+ public sourceValues = ['Manual', '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'];
@@ -326,10 +325,6 @@ export class ParameterComponent implements OnInit {
// Create the file reader
let reader = new FileReader();
this.readFile(input.files[0], reader, (result) => {
- if ('keyfile' === uploadType) {
- this.myKeyFileName = input.files[0].name;
- this.displayParamObjects = this.parameterDefinitionService.processKeyFile(this.myKeyFileName, result);
- }
if ('pdfile' === uploadType) {
this.myPdFileName = input.files[0].name;
this.displayParamObjects = this.parameterDefinitionService.processPDfile(this.myPdFileName, result);