Add error handling to improve user experience
[portal/ric-dashboard.git] / webapp-frontend / src / app / ran-control / ran-control.component.html
1 <!--
2   ========================LICENSE_START=================================
3   O-RAN-SC
4   %%
5   Copyright (C) 2019 AT&T Intellectual Property and Nokia
6   %%
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ========================LICENSE_END===================================
19 -->
20
21 <div class="ran-control__section">
22   <h3 class="ran-control__header">RAN Connections</h3>
23
24   <button mat-raised-button (click)="setupRANConnection()">Setup Connection..</button>
25   <button mat-raised-button color="warn" class="disconnect-all-button"
26     (click)="disconnectAllRANConnections()">Disconnect All</button>
27
28   <table mat-table class="ran-control-table mat-elevation-z8" [dataSource]="dataSource">
29
30     <ng-container matColumnDef="nbId">
31       <mat-header-cell *matHeaderCellDef>Nodeb ID</mat-header-cell>
32       <mat-cell *matCellDef="let ran">{{ran.nodebIdentity.globalNbId.nbId}}</mat-cell>
33     </ng-container>
34
35     <ng-container matColumnDef="nodeType">
36       <mat-header-cell *matHeaderCellDef>Node Type</mat-header-cell>
37       <mat-cell *matCellDef="let ran">{{ran.nodebStatus.nodeType}}</mat-cell>
38     </ng-container>
39
40     <ng-container matColumnDef="ranName">
41       <mat-header-cell *matHeaderCellDef>RAN Name</mat-header-cell>
42       <mat-cell *matCellDef="let ran">{{ran.nodebIdentity.inventoryName}}</mat-cell>
43     </ng-container>
44
45     <ng-container matColumnDef="ranIp">
46       <mat-header-cell *matHeaderCellDef>IP</mat-header-cell>
47       <mat-cell *matCellDef="let ran">{{ran.nodebStatus.ip}}</mat-cell>
48     </ng-container>
49
50     <ng-container matColumnDef="ranPort">
51       <mat-header-cell *matHeaderCellDef>Port</mat-header-cell>
52       <mat-cell *matCellDef="let ran">{{ran.nodebStatus.port}}</mat-cell>
53     </ng-container>
54
55     <ng-container matColumnDef="connectionStatus">
56       <mat-header-cell *matHeaderCellDef>Connection Status</mat-header-cell>
57       <mat-cell *matCellDef="let ran">{{ran.nodebStatus.connectionStatus}}</mat-cell>
58     </ng-container>
59
60     <ng-container matColumnDef="noRecordsFound">
61       <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
62     </ng-container>
63
64     <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
65     <mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
66     <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': dataSource.rowCount > 0}"></mat-footer-row>
67
68   </table>
69
70   <div class="spinner-container" *ngIf="dataSource.loading$ | async">
71     <mat-spinner></mat-spinner>
72   </div>
73
74 </div>