aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-07-16 17:02:46 +0530
committerPatrick Brady <pb071s@att.com>2018-07-16 19:15:25 +0000
commit170263d8b8b076d9ec9193679c1a481ca372a785 (patch)
treee2ffc979700c788e68e54513752e0991b71e65ce /src/app
parent54f1c5e013bade034eca118467c9b620275c1b0c (diff)
added error block in getArtifacts method
added error block in getArtifacts method to handle error scenario like error connecting to appc. The user will be notified with the angular2-notification whenever there is error connecting to appc. Issue-ID: APPC-1083 Change-Id: I185e390cb0ddef2edea8f08d08ae124c7d05a06c Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/vnfs/myvnfs/myvnfs.component.html5
-rw-r--r--src/app/vnfs/myvnfs/myvnfs.component.ts25
2 files changed, 22 insertions, 8 deletions
diff --git a/src/app/vnfs/myvnfs/myvnfs.component.html b/src/app/vnfs/myvnfs/myvnfs.component.html
index c214a2c..3ce7859 100644
--- a/src/app/vnfs/myvnfs/myvnfs.component.html
+++ b/src/app/vnfs/myvnfs/myvnfs.component.html
@@ -3,7 +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);
you may not use this software except in compliance with the License.
@@ -17,9 +18,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-ECOMP is a trademark and service mark of AT&T Intellectual Property.
============LICENSE_END============================================
-->
+<simple-notifications [options]="options"></simple-notifications>
<ng-progress [positionUsing]="'marginLeft'" [minimum]="0.15" [maximum]="1" [speed]="200" [showSpinner]="false" [direction]="'leftToRightIncreased'" [color]="'#6ab344'" [trickleSpeed]="250" [thick]="true" [ease]="'linear'"></ng-progress>
<div class="container">
<div *ngIf="noData != true">
diff --git a/src/app/vnfs/myvnfs/myvnfs.component.ts b/src/app/vnfs/myvnfs/myvnfs.component.ts
index 37ebe96..c747a7e 100644
--- a/src/app/vnfs/myvnfs/myvnfs.component.ts
+++ b/src/app/vnfs/myvnfs/myvnfs.component.ts
@@ -3,7 +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);
you may not use this software except in compliance with the License.
@@ -17,7 +18,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-ECOMP is a trademark and service mark of AT&T Intellectual Property.
============LICENSE_END============================================
*/
@@ -29,7 +29,7 @@ import { ParamShareService } from '../../shared/services/paramShare.service';
import { environment } from '../../../environments/environment';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { NgProgress } from 'ngx-progressbar';
-
+import { NotificationsService } from 'angular2-notifications';
@Component({ selector: 'app-myvnfs', templateUrl: './myvnfs.component.html', styleUrls: ['./myvnfs.component.css'] })
export class MyvnfsComponent implements OnInit {
@@ -41,9 +41,16 @@ export class MyvnfsComponent implements OnInit {
noDataMsg: string;
vnfType: any;
vnfcType: any;
+ options = {
+ timeOut: 1000,
+ showProgressBar: true,
+ pauseOnHover: true,
+ clickToClose: true,
+ maxLength: 200
+ }
constructor (private paramShareService: ParamShareService, private ngProgress: NgProgress, private httpUtil: HttpUtilService, private router: Router, private activeROute: ActivatedRoute,
- private mappingEditorService: MappingEditorService, private modalService: NgbModal) {
+ private mappingEditorService: MappingEditorService, private modalService: NgbModal,private nService: NotificationsService) {
}
ngOnInit() {
@@ -88,8 +95,14 @@ export class MyvnfsComponent implements OnInit {
}
console.log(this.noData);
this.ngProgress.done();
- });
-
+ }
+ ,
+ error => {
+
+ this.nService.error("Error", "Error in connecting to APPC Server")}
+
+ );
+
this.filter = ['vnf-type', 'vnfc-type', 'artifact-name'];
setTimeout(() => {
this.ngProgress.done();