Add error handling to improve user experience
[portal/ric-dashboard.git] / webapp-frontend / src / app / ran-control / ran-control.component.html
index 860e137..474542a 100644 (file)
   <button mat-raised-button color="warn" class="disconnect-all-button"
     (click)="disconnectAllRANConnections()">Disconnect All</button>
 
-  <div class="spinner-container" *ngIf="dataSource.loading$ | async">
-    <mat-spinner></mat-spinner>
-  </div>
-
   <table mat-table class="ran-control-table mat-elevation-z8" [dataSource]="dataSource">
 
     <ng-container matColumnDef="nbId">
       <mat-cell *matCellDef="let ran">{{ran.nodebStatus.connectionStatus}}</mat-cell>
     </ng-container>
 
-    <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
+    <ng-container matColumnDef="noRecordsFound">
+      <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
+    </ng-container>
 
+    <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
     <mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
+    <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': dataSource.rowCount > 0}"></mat-footer-row>
 
   </table>
 
+  <div class="spinner-container" *ngIf="dataSource.loading$ | async">
+    <mat-spinner></mat-spinner>
+  </div>
+
 </div>