Integrate EPSDK-FW library for auth and users
[portal/ric-dashboard.git] / webapp-frontend / src / app / anr-xapp / anr-xapp.component.ts
index 3440482..652c955 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
+import { HttpResponse } from '@angular/common/http';
 import { MatSort } from '@angular/material';
 import { MatDialog } from '@angular/material/dialog';
 import { fromEvent } from 'rxjs/observable/fromEvent';
@@ -39,7 +40,6 @@ import { ANRXappDataSource } from './anr-xapp.datasource';
 export class AnrXappComponent implements AfterViewInit, OnInit {
 
   dataSource: ANRXappDataSource;
-  anrClientVersion: string;
   gNodeBIds: string[];
   @ViewChild('ggNodeB', {static: true}) ggNodeB: ElementRef;
   @ViewChild('servingCellNrcgi', {static: true}) servingCellNrcgi: ElementRef;
@@ -57,11 +57,10 @@ export class AnrXappComponent implements AfterViewInit, OnInit {
     private notificationService: NotificationService) { }
 
   ngOnInit() {
-    this.dataSource = new ANRXappDataSource(this.anrXappService, this.sort);
+    this.dataSource = new ANRXappDataSource(this.anrXappService, this.sort, this.notificationService);
     this.dataSource.loadTable();
     // Empty string occurs first in the array of gNodeBIds
     this.anrXappService.getgNodeBs().subscribe((res: string[]) => this.gNodeBIds = res);
-    this.anrXappService.getVersion().subscribe((res: string) => this.anrClientVersion = res);
   }
 
   ngAfterViewInit() {
@@ -110,7 +109,7 @@ export class AnrXappComponent implements AfterViewInit, OnInit {
         if (res) {
           this.anrXappService.deleteNcr(ncr.servingCellNrcgi, ncr.neighborCellNrpci)
             .subscribe(
-              response => {
+              (response: HttpResponse<Object>) => {
                 switch (response.status) {
                   case 200:
                     this.notificationService.success('Delete succeeded!');