added setTimeOut method in PD retrival progres bar 71/56371/4
authorSandeep J <sandeejh@in.ibm.com>
Fri, 13 Jul 2018 09:40:51 +0000 (15:10 +0530)
committerTakamune Cho <tc012c@att.com>
Wed, 18 Jul 2018 13:24:11 +0000 (13:24 +0000)
added setTimeOut of 3.5 seconds in progress bar for retrieving PD data from APPC

Issue-ID: APPC-1073
Change-Id: I79432be9b3f74dfa84e7a37da6fb8d86c2a779f5
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts

index 3c95859..8725c3c 100644 (file)
@@ -3,6 +3,8 @@
 ===================================================================
 Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
 ===================================================================
+Copyright (C) 2018 IBM.
+===================================================================
 
 Unless otherwise specified, all software contained herein is licensed
 under the Apache License, Version 2.0 (the License);
@@ -33,7 +35,6 @@ import { ParameterDefinitionService } from './parameter-definition.service';
 import 'rxjs/add/operator/map';
 import { NgProgress } from 'ngx-progressbar';
 
-
 let YAML = require('yamljs');
 
 declare var $: any;
@@ -254,7 +255,11 @@ export class ParameterComponent implements OnInit {
             if (this.paramShareService.getSessionParamData() != undefined && this.paramShareService.getSessionParamData().length > 0) {
                 this.getPDFromSession();
             } else {
+                this.ngProgress.start();
                 this.getPD();
+                setTimeout(() => {
+                this.ngProgress.done();
+            }, 3500);
             }
         } else {
             this.nService.error('Error', 'Please enter Action and VNF type in Reference Data screen');
@@ -275,7 +280,6 @@ export class ParameterComponent implements OnInit {
             }
         };
         let artifactContent: any;
-        this.ngProgress.start();
         return this.httpService.post({
             url: environment.getDesigns,
             data: input
@@ -286,14 +290,11 @@ export class ParameterComponent implements OnInit {
                 let fileModel = pdObject['vnf-parameter-list'];
                 this.displayParamObjects = this.parameterDefinitionService.populatePD(fileModel);
             }
-            else {
-
-            }
-            this.ngProgress.done();
+                       
         },
 
             error => this.nService.error('Error', 'Error in connecting APPC Server'));
-
+         
     }
 
     public getPDFromSession() {
@@ -340,7 +341,6 @@ export class ParameterComponent implements OnInit {
 
     //========================== End of ngOnDestroy() Method============================================
 
-    //========================== End of createOrUpdateParameterDefinitionData() Method============================================
     public showUpload() {
         this.selectedUploadType = this.uploadTypes[0].value;
     };
@@ -357,8 +357,7 @@ export class ParameterComponent implements OnInit {
                     this.displayParamObjects = this.parameterDefinitionService.processPDfile(this.myPdFileName, result);
                 }
             });
-        } else {
-            //this.notificationService.notifyErrorMessage('Failed to read file!Please try again.');
+            
         }
     }