RIC Dashboard Release Notes
===========================
-Version 1.0.4, 29 May 2019
+Version 1.0.4, 30 May 2019
--------------------------
* Add ANR xApp neighbor cell relation table
* Drop the pendulum xApp control screen
+* Add disconnect-all button to RAN connection screen
Version 1.0.3, 28 May 2019
--------------------------
return responses;
}
+ // TODO replace with actual delete all RAN connections functionality
+ @ApiOperation(value = "Disconnect all RAN Connections.")
+ @RequestMapping(value = "/disconnectAllRAN", method = RequestMethod.DELETE)
+ public void disconnectAllRANConnections() {
+ logger.debug("disconnectAllRANConnections");
+ responses.clear();
+ }
+
@ApiOperation(value = "Sets up an EN-DC RAN connection via the E2 manager.", response = E2SetupResponse.class)
@RequestMapping(value = "/endcSetup", method = RequestMethod.POST)
public E2SetupResponse endcSetup(@RequestBody SetupRequest setupRequest, HttpServletResponse response) {
========================LICENSE_END===================================
-->
<div class="ranconnect__section">
- <h3 class="ranconnect__header">RAN Connection</h3>
- <button mat-raised-button (click)="openRanConnectDialog()">Connect</button>
- <table mat-table [dataSource]="dataSource" class="ranconnect-table mat-elevation-z8">
-
+ <h3 class="ranconnect__header">RAN Connections</h3>
+
+ <button mat-raised-button (click)="setupRANConnection()">Setup Connection..</button>
+ <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="ranconnect-table mat-elevation-z8" [dataSource]="dataSource">
+
<ng-container matColumnDef="requestType">
- <mat-header-cell *matHeaderCellDef>RAN Type</mat-header-cell>
- <mat-cell *matCellDef="let rconnect">{{rconnect.requestType}}</mat-cell>
+ <mat-header-cell *matHeaderCellDef>RAN Type</mat-header-cell>
+ <mat-cell *matCellDef="let rconnect">{{rconnect.requestType}}</mat-cell>
</ng-container>
-
+
<ng-container matColumnDef="ranName">
- <mat-header-cell *matHeaderCellDef>eNodeB/gNodeB Name</mat-header-cell>
- <mat-cell *matCellDef="let rconnect">{{rconnect.ranName}}</mat-cell>
+ <mat-header-cell *matHeaderCellDef>eNodeB/gNodeB Name</mat-header-cell>
+ <mat-cell *matCellDef="let rconnect">{{rconnect.ranName}}</mat-cell>
</ng-container>
<ng-container matColumnDef="ranIp">
- <mat-header-cell *matHeaderCellDef>IP</mat-header-cell>
- <mat-cell *matCellDef="let rconnect">{{rconnect.ranIp}}</mat-cell>
+ <mat-header-cell *matHeaderCellDef>IP</mat-header-cell>
+ <mat-cell *matCellDef="let rconnect">{{rconnect.ranIp}}</mat-cell>
</ng-container>
-
+
<ng-container matColumnDef="ranPort">
- <mat-header-cell *matHeaderCellDef>Port</mat-header-cell>
- <mat-cell *matCellDef="let rconnect">{{rconnect.ranPort}}</mat-cell>
+ <mat-header-cell *matHeaderCellDef>Port</mat-header-cell>
+ <mat-cell *matCellDef="let rconnect">{{rconnect.ranPort}}</mat-cell>
</ng-container>
<ng-container matColumnDef="responseCode">
- <mat-header-cell *matHeaderCellDef>Response</mat-header-cell>
- <mat-cell *matCellDef="let rconnect">{{rconnect.responseCode}}</mat-cell>
+ <mat-header-cell *matHeaderCellDef>Response</mat-header-cell>
+ <mat-cell *matCellDef="let rconnect">{{rconnect.responseCode}}</mat-cell>
</ng-container>
<ng-container matColumnDef="timeStamp">
- <mat-header-cell *matHeaderCellDef>Time Stamp</mat-header-cell>
- <mat-cell *matCellDef="let rconnect">{{rconnect.timeStamp}}</mat-cell>
+ <mat-header-cell *matHeaderCellDef>Time Stamp</mat-header-cell>
+ <mat-cell *matCellDef="let rconnect">{{rconnect.timeStamp}}</mat-cell>
</ng-container>
-
+
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
- <mat-row *matRowDef="let row; columns: displayedColumns">
- </mat-row>
+
+ <mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
+
</table>
- <app-modal-event hidden></app-modal-event>
-</div>
+</div>
\ No newline at end of file
}
.ranconnect-table {
- width: 99%; /* 100 looks wrong */
- min-height: 150px;
+ width: 100%;
+ min-height: 100px;
margin-top: 10px;
background-color:transparent;
}
-
+.disconnect-all-button {
+ float: right;
+}
\ No newline at end of file
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { RanConnectionComponent } from './ran-connection.component';
+import { RANConnectionComponent } from './ran-connection.component';
-describe('RanConnectionComponent', () => {
- let component: RanConnectionComponent;
- let fixture: ComponentFixture<RanConnectionComponent>;
+describe('RANConnectionComponent', () => {
+ let component: RANConnectionComponent;
+ let fixture: ComponentFixture<RANConnectionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ RanConnectionComponent ]
+ declarations: [ RANConnectionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(RanConnectionComponent);
+ fixture = TestBed.createComponent(RANConnectionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* ========================LICENSE_END===================================
*/
import { Component, OnInit } from '@angular/core';
-import { MatDialog} from '@angular/material/dialog';
+import { MatDialog } from '@angular/material/dialog';
import { RANConnectionDialogComponent } from './ran-connection-dialog.component';
import { E2ManagerService } from '../services/e2-mgr/e2-mgr.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 { E2SetupRequest } from '../interfaces/e2-mgr.types';
import { RANConnectionDataSource } from './ran-connection.datasource';
+import { HttpErrorResponse } from '@angular/common/http';
+import { Observable } from 'rxjs';
@Component({
styleUrls: ['./ran-connection.component.scss']
})
export class RANConnectionComponent implements OnInit {
- displayedColumns: string[] = [ 'requestType', 'ranName', 'ranIp', 'ranPort', 'responseCode', 'timeStamp' ];
+ displayedColumns: string[] = ['requestType', 'ranName', 'ranIp', 'ranPort', 'responseCode', 'timeStamp'];
dataSource: RANConnectionDataSource;
- constructor(private e2MgrSvc: E2ManagerService, public dialog: MatDialog) { }
+ constructor(private e2MgrSvc: E2ManagerService, private errorSvc: ErrorDialogService,
+ private confirmDialogService: ConfirmDialogService, private notification: NotificationService,
+ public dialog: MatDialog) { }
ngOnInit() {
this.dataSource = new RANConnectionDataSource(this.e2MgrSvc);
this.dataSource.loadTable();
}
- openRanConnectDialog() {
+ setupRANConnection() {
const dialogRef = this.dialog.open(RANConnectionDialogComponent, {
width: '450px',
data: {}
});
dialogRef.afterClosed().subscribe(result => {
- this.dataSource = new RANConnectionDataSource(this.e2MgrSvc);
this.dataSource.loadTable();
});
}
+ disconnectAllRANConnections() {
+ let httpErrRes: HttpErrorResponse;
+ const aboutError = 'Disconnect all RAN Connections Failed: ';
+ this.confirmDialogService.openConfirmDialog('Are you sure you want to disconnect all RAN connections?')
+ .afterClosed().subscribe(res => {
+ if (res) {
+ this.e2MgrSvc.disconnectAllRAN().subscribe(
+ response => {
+ if (response.status === 200) {
+ this.notification.success('Disconnect all RAN Connections Succeeded!');
+ this.dataSource.loadTable();
+ }
+ },
+ (error => {
+ httpErrRes = error;
+ this.errorSvc.displayError(aboutError + httpErrRes.message);
+ })
+ );
+ }
+ });
+ }
}
import { E2SetupRequest } from '../interfaces/e2-mgr.types';
import { E2ManagerService } from '../services/e2-mgr/e2-mgr.service';
-
export class RANConnectionDataSource extends DataSource<E2SetupRequest> {
private ranConnectSubject = new BehaviorSubject<E2SetupRequest[]>([]);
catchError(() => of([])),
finalize(() => this.loadingSubject.next(false))
)
- .subscribe((ranConnect: E2SetupRequest[]) => this.ranConnectSubject.next(ranConnect) )
+ .subscribe((ranConnect: E2SetupRequest[]) => this.ranConnectSubject.next(ranConnect));
}
connect(collectionViewer: CollectionViewer): Observable<E2SetupRequest[]> {
this.loadingSubject.complete();
}
-}
\ No newline at end of file
+}
return this.httpClient.post(this.basePath + 'x2Setup', req);
}
+ disconnectAllRAN() {
+ return this.httpClient.delete((this.basePath + 'disconnectAllRAN'), { observe: 'response' });
+ }
+
}