summaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts/template-holder/param-name-value
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-07-20 13:28:33 +0530
committerTakamune Cho <tc012c@att.com>2018-07-27 12:00:14 +0000
commit70fc95f0db2ed052cbb6067583cc890646753c9e (patch)
tree347e23938c4b8a84c85a7183180be694ab3d0240 /src/app/vnfs/build-artifacts/template-holder/param-name-value
parentfd6026bdab400c36f951a4eacf1041f2a9a49ba3 (diff)
refactored payload creation proces in retrieve API
refactored payload creation in retrieveNameValueFromAppc method of param-name-value.component.ts by using the createPayloadForRetrieve method in utility.service.ts Issue-ID: APPC-1098 Change-Id: Ia5b4a7c259c9a27958b6df9c59869a79b03064ee Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts/template-holder/param-name-value')
-rw-r--r--src/app/vnfs/build-artifacts/template-holder/param-name-value/param-name-value.component.ts17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/app/vnfs/build-artifacts/template-holder/param-name-value/param-name-value.component.ts b/src/app/vnfs/build-artifacts/template-holder/param-name-value/param-name-value.component.ts
index bdf0b29..40a5291 100644
--- a/src/app/vnfs/build-artifacts/template-holder/param-name-value/param-name-value.component.ts
+++ b/src/app/vnfs/build-artifacts/template-holder/param-name-value/param-name-value.component.ts
@@ -43,6 +43,7 @@ import { environment } from '../../../../../environments/environment';
import { NgProgress } from 'ngx-progressbar';
import * as XLSX from 'xlsx';
import { NgxSpinnerService } from 'ngx-spinner';
+import {UtilityService} from '../../../../shared/services/utilityService/utility.service';
declare var $: any;
@@ -120,7 +121,8 @@ export class GoldenConfigurationMappingComponent implements OnInit, OnDestroy {
private notificationService: NotificationService,
private nService: NotificationsService,
private ngProgress: NgProgress,
- private spinner: NgxSpinnerService
+ private spinner: NgxSpinnerService,
+ private utilityService: UtilityService,
) {
this.artifactRequest.action = '';
this.artifactRequest.version = '';
@@ -319,18 +321,7 @@ export class GoldenConfigurationMappingComponent implements OnInit, OnDestroy {
if (id) fileName = this.updateFileNameForConfigScaleOut(this.item.action, scopeName, this.versionNo, id);
else fileName = this.updateFileName(this.item.action, scopeName, this.versionNo);
- let payload = '{"userID": "' + this.userId + '", "action": "' + this.item.action + '", "vnf-type" : "' + this.vnfType + '", "artifact-type":"APPC-CONFIG", "artifact-name":"' + fileName + '"}';
- let input = {
- 'input': {
- 'design-request': {
- 'request-id': this.apiToken,
- 'action': 'getArtifact',
- 'payload': payload
- }
- }
- };
-
- console.log('Retrieve name value from appc payload===>>' + payload);
+ let input=this.utilityService.createPayloadForRetrieve(false, this.item.action, this.vnfType, fileName);
let artifactContent: any;
this.ngProgress.start();
this.nameValueSubscription = this.httpUtil.post({