Add error handling to improve user experience
[portal/ric-dashboard.git] / webapp-frontend / src / app / anr-xapp / anr-xapp.component.ts
index 02b1f3f..ba24071 100644 (file)
@@ -28,18 +28,17 @@ import { ANRXappService } from '../services/anr-xapp/anr-xapp.service';
 import { ErrorDialogService } from '../services/ui/error-dialog.service';
 import { ConfirmDialogService } from './../services/ui/confirm-dialog.service';
 import { NotificationService } from './../services/ui/notification.service';
-import { ANREditNCRDialogComponent } from './anr-edit-ncr-dialog.component';
+import { AnrEditNcrDialogComponent } from './anr-edit-ncr-dialog.component';
 import { ANRXappDataSource } from './anr-xapp.datasource';
 
 @Component({
-  selector: 'app-anr',
+  selector: 'rd-anr',
   templateUrl: './anr-xapp.component.html',
   styleUrls: ['./anr-xapp.component.scss']
 })
 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 +56,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() {
@@ -94,7 +92,7 @@ export class AnrXappComponent implements AfterViewInit, OnInit {
   }
 
   modifyNcr(ncr: ANRNeighborCellRelation): void {
-    const dialogRef = this.dialog.open(ANREditNCRDialogComponent, {
+    const dialogRef = this.dialog.open(AnrEditNcrDialogComponent, {
       width: '300px',
       data: ncr
     });