* Move mock admin screen user data to backend
* Update App manager client to spec version 0.1.5
* Rework admin table
+* Remove the RAN connection invocation link from left menu and move it to control screen
Version 1.0.3, 28 May 2019
--------------------------
import { animate, state, style, transition, trigger } from '@angular/animations';
-export const ControlAnimations = {
+export const AppControlAnimations = {
messageTrigger: trigger('messageExpand', [
state('collapsed', style({ height: '0px', minHeight: '0', display: 'none' })),
state('expanded', style({ height: '*' })),
--- /dev/null
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * %%
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================LICENSE_END===================================
+ */
+ .app-control__section {
+}
+
+.app-control__header {
+ text-align: center;
+ color: #432c85;
+ font-size: 50px;
+ font-weight: 200;
+ letter-spacing: .1em;
+ transform: translate(149 56);
+}
+
+.spinner-container {
+ height: 360px;
+ width: 390px;
+ position: fixed;
+}
+
+.spinner-container mat-spinner {
+ margin: 130px auto 0 auto;
+}
+
+.app-control-table {
+ width: 100%;
+ min-height: 150px;
+ margin-top: 10px;
+ background-color: transparent;
+}
+
+tr.message-row {
+ height: 0;
+}
--- /dev/null
+<!--
+ ========================LICENSE_START=================================
+ O-RAN-SC
+ %%
+ Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ %%
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ========================LICENSE_END===================================
+ -->
+
+<div class="app-control__section">
+ <h3 class="app-control__header">xApp Control</h3>
+ <div class="spinner-container" *ngIf="dataSource.loading$ | async">
+ <mat-spinner></mat-spinner>
+ </div>
+ <table mat-table [dataSource]="dataSource" matSort multiTemplateDataRows class="app-control-table mat-elevation-z8">
+
+ <ng-container matColumnDef="xapp">
+ <mat-header-cell *matHeaderCellDef mat-sort-header> App Name </mat-header-cell>
+ <mat-cell *matCellDef="let element"> {{element.xapp}} </mat-cell>
+ </ng-container>
+
+ <ng-container matColumnDef="name">
+ <mat-header-cell *matHeaderCellDef mat-sort-header> Instance Name</mat-header-cell>
+ <mat-cell *matCellDef="let element"> {{element.instance.name}} </mat-cell>
+ </ng-container>
+
+ <ng-container matColumnDef="status">
+ <mat-header-cell *matHeaderCellDef mat-sort-header> Status </mat-header-cell>
+ <mat-cell *matCellDef="let element"> {{element.instance.status}} </mat-cell>
+ </ng-container>
+
+ <ng-container matColumnDef="ip" >
+ <mat-header-cell *matHeaderCellDef mat-sort-header> IP </mat-header-cell>
+ <mat-cell *matCellDef="let element"> {{element.instance.ip}} </mat-cell>
+ </ng-container>
+
+ <ng-container matColumnDef="port">
+ <mat-header-cell *matHeaderCellDef mat-sort-header> Port </mat-header-cell>
+ <mat-cell *matCellDef="let element"> {{element.instance.port}} </mat-cell>
+ </ng-container>
+
+ <ng-container matColumnDef="action">
+ <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>
+ <!-- click on button should not expand/collapse the row -->
+ <mat-cell *matCellDef="let element" (click)="$event.stopPropagation()">
+ <button mat-icon-button (click)="controlApp(element)">
+ <mat-icon>settings</mat-icon>
+ </button>
+ <button mat-icon-button color="warn" (click)="undeployApp(element)">
+ <mat-icon>delete</mat-icon>
+ </button>
+ </mat-cell>
+ </ng-container>
+
+ <ng-container matColumnDef="expandedDetail">
+ <td mat-cell *matCellDef="let element" [attr.colspan]="displayedColumns.length">
+ <div [@messageExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
+ <div>
+ txMessages:
+ </div>
+ <li *ngFor="let rxmessage of element.instance.rxMessages">
+ <span>{{rxmessage}}</span>
+ </li>
+ <div>
+ rxMessages:
+ </div>
+ <li *ngFor="let txmessage of element.instance.txMessages">
+ <span>{{txmessage}}</span>
+ </li>
+ </div>
+ </td>
+ </ng-container>
+
+ <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
+ <mat-row *matRowDef="let element; columns: displayedColumns;"
+ [class.example-expanded-row]="expandedElement === element"
+ (click)="expandedElement = expandedElement === element ? null : element"></mat-row>
+ <tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="message-row"></tr>
+ </table>
+</div>
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { RANConnectionComponent } from './ran-connection.component';
+import { AppControlComponent } from './app-control.component';
-describe('RANConnectionComponent', () => {
- let component: RANConnectionComponent;
- let fixture: ComponentFixture<RANConnectionComponent>;
+describe('AppControlComponent', () => {
+ let component: AppControlComponent;
+ let fixture: ComponentFixture<AppControlComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ RANConnectionComponent ]
+ declarations: [ AppControlComponent ]
})
.compileComponents();
}));
beforeEach(() => {
- fixture = TestBed.createComponent(RANConnectionComponent);
+ fixture = TestBed.createComponent(AppControlComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
--- /dev/null
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * %%
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================LICENSE_END===================================
+ */
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { MatSort } from '@angular/material/sort';
+import { Router } from '@angular/router';
+import { XappControlRow } from '../interfaces/app-mgr.types';
+import { AppMgrService } from '../services/app-mgr/app-mgr.service';
+import { ConfirmDialogService } from '../services/ui/confirm-dialog.service';
+import { ErrorDialogService } from '../services/ui/error-dialog.service';
+import { NotificationService } from '../services/ui/notification.service';
+import { AppControlAnimations } from './app-control.animations';
+import { AppControlDataSource } from './app-control.datasource';
+
+@Component({
+ selector: 'control-app-control',
+ templateUrl: './app-control.component.html',
+ styleUrls: ['./app-control.component.css'],
+ animations: [AppControlAnimations.messageTrigger]
+})
+export class AppControlComponent implements OnInit {
+
+ displayedColumns: string[] = ['xapp', 'name', 'status', 'ip', 'port', 'action'];
+ dataSource: AppControlDataSource;
+ @ViewChild(MatSort) sort: MatSort;
+
+ constructor(
+ private appMgrSvc: AppMgrService,
+ private router: Router,
+ private confirmDialogService: ConfirmDialogService,
+ private errorDialogService: ErrorDialogService,
+ private notification: NotificationService) { }
+
+ ngOnInit() {
+ this.dataSource = new AppControlDataSource(this.appMgrSvc, this.sort);
+ this.dataSource.loadTable();
+ }
+
+ controlApp(app: XappControlRow): void {
+ const acXappPattern = /[Aa][Dd][Mm][Ii][Ss]{2}[Ii][Oo][Nn]/;
+ const anrXappPattern = /[Aa][Nn][Rr]/;
+ if (acXappPattern.test(app.xapp)) {
+ this.router.navigate(['/ac']);
+ } else if (anrXappPattern.test(app.xapp)) {
+ this.router.navigate(['/anr']);
+ } else {
+ this.errorDialogService.displayError('No control available for ' + app.xapp + ' (yet)');
+ }
+ }
+
+ undeployApp(app: XappControlRow): void {
+ this.confirmDialogService.openConfirmDialog('Are you sure you want to undeploy xApp ' + app.xapp + '?')
+ .afterClosed().subscribe(res => {
+ if (res) {
+ this.appMgrSvc.undeployXapp(app.xapp).subscribe(
+ response => {
+ this.dataSource.loadTable();
+ switch (response.status) {
+ case 200:
+ this.notification.success('xApp undeployed successfully!');
+ break;
+ default:
+ this.notification.warn('xApp undeploy failed.');
+ }
+ }
+ );
+ }
+ });
+ }
+
+}
import { XappControlRow, XMDeployedApp, XMXappInstance } from '../interfaces/app-mgr.types';
import { AppMgrService } from '../services/app-mgr/app-mgr.service';
-export class ControlDataSource extends DataSource<XappControlRow> {
+export class AppControlDataSource extends DataSource<XappControlRow> {
private xAppInstancesSubject = new BehaviorSubject<XappControlRow[]>([]);
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { CatalogComponent } from './catalog/catalog.component';
-import { ControlComponent } from './control/control.component';
-import { RANConnectionComponent } from './ran-connection/ran-connection.component';
import { StatsComponent } from './stats/stats.component';
import { UserComponent } from './admin/user.component';
import { AcXappComponent } from './ac-xapp/ac-xapp.component';
import { AnrXappComponent } from './anr-xapp/anr-xapp.component';
+import { ControlComponent } from './control/control.component';
const routes: Routes = [
{path: '', component: LoginComponent},
{path: 'login', component: LoginComponent},
{path: 'catalog', component: CatalogComponent},
{path: 'control', component: ControlComponent},
- {path: 'ran-connection', component: RANConnectionComponent},
{path: 'stats', component: StatsComponent},
{path: 'admin', component: UserComponent},
{path: 'ac', component: AcXappComponent},
import { DashboardService } from './services/dashboard/dashboard.service';
import { E2ManagerService } from './services/e2-mgr/e2-mgr.service';
import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
+import { AppControlComponent } from './app-control/app-control.component';
import { ControlComponent } from './control/control.component';
-import { RANConnectionDialogComponent } from './ran-connection/ran-connection-dialog.component';
-import { RANConnectionComponent } from './ran-connection/ran-connection.component';
+import { RANConnectionDialogComponent } from './ran-control/ran-connection-dialog.component';
+import { RanControlComponent } from './ran-control/ran-control.component';
import { ANREditNCRDialogComponent } from './anr-xapp/anr-edit-ncr-dialog.component';
import { StatsComponent } from './stats/stats.component';
import { UserComponent } from './admin/user.component';
import { EditDashboardUserDialogComponent } from './admin/edit-dashboard-user-dialog/edit-dashboard-user-dialog.component';
+
@NgModule({
declarations: [
AcXappComponent,
ConfigEventComponent,
ConfirmDialogComponent,
ControlCardComponent,
- ControlComponent,
+ AppControlComponent,
ErrorDialogComponent,
FooterComponent,
LoginComponent,
ModalEventComponent,
- RANConnectionComponent,
+ RanControlComponent,
RANConnectionDialogComponent,
SidenavListComponent,
StatCardComponent,
StatsComponent,
AddDashboardUserDialogComponent,
- EditDashboardUserDialogComponent
+ EditDashboardUserDialogComponent,
+ ControlComponent
],
imports: [
AppRoutingModule,
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
- * %%
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================LICENSE_END===================================
- */
- .control__section {
-}
-
-.control__header {
- text-align: center;
- color: #432c85;
- font-size: 50px;
- font-weight: 200;
- letter-spacing: .1em;
- transform: translate(149 56);
-}
-
-.spinner-container {
- height: 360px;
- width: 390px;
- position: fixed;
-}
-
-.spinner-container mat-spinner {
- margin: 130px auto 0 auto;
-}
-
-.control-table {
- width: 99%;
- min-height: 150px;
- margin-top: 10px;
+.control__section {
background-color: transparent;
-}
-
-tr.message-row {
- height: 0;
-}
+}
\ No newline at end of file
========================LICENSE_END===================================
-->
<div class="control__section">
- <h3 class="control__header">xApp Control</h3>
- <div class="spinner-container" *ngIf="dataSource.loading$ | async">
- <mat-spinner></mat-spinner>
- </div>
- <table mat-table [dataSource]="dataSource" matSort multiTemplateDataRows class="control-table mat-elevation-z8">
+ <control-ran-control></control-ran-control>
+ <hr>
+ <control-app-control></control-app-control>
+</div>
- <ng-container matColumnDef="xapp">
- <mat-header-cell *matHeaderCellDef mat-sort-header> App Name </mat-header-cell>
- <mat-cell *matCellDef="let element"> {{element.xapp}} </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="name">
- <mat-header-cell *matHeaderCellDef mat-sort-header> Instance Name</mat-header-cell>
- <mat-cell *matCellDef="let element"> {{element.instance.name}} </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="status">
- <mat-header-cell *matHeaderCellDef mat-sort-header> Status </mat-header-cell>
- <mat-cell *matCellDef="let element"> {{element.instance.status}} </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="ip" >
- <mat-header-cell *matHeaderCellDef mat-sort-header> IP </mat-header-cell>
- <mat-cell *matCellDef="let element"> {{element.instance.ip}} </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="port">
- <mat-header-cell *matHeaderCellDef mat-sort-header> Port </mat-header-cell>
- <mat-cell *matCellDef="let element"> {{element.instance.port}} </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="action">
- <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>
- <!-- click on button should not expand/collapse the row -->
- <mat-cell *matCellDef="let element" (click)="$event.stopPropagation()">
- <button mat-icon-button (click)="controlApp(element)">
- <mat-icon>settings</mat-icon>
- </button>
- <button mat-icon-button color="warn" (click)="undeployApp(element)">
- <mat-icon>delete</mat-icon>
- </button>
- </mat-cell>
- </ng-container>
-
- <ng-container matColumnDef="expandedDetail">
- <td mat-cell *matCellDef="let element" [attr.colspan]="displayedColumns.length">
- <div [@messageExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
- <div>
- txMessages:
- </div>
- <li *ngFor="let rxmessage of element.instance.rxMessages">
- <span>{{rxmessage}}</span>
- </li>
- <div>
- rxMessages:
- </div>
- <li *ngFor="let txmessage of element.instance.txMessages">
- <span>{{txmessage}}</span>
- </li>
- </div>
- </td>
- </ng-container>
-
- <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
- <mat-row *matRowDef="let element; columns: displayedColumns;"
- [class.example-expanded-row]="expandedElement === element"
- (click)="expandedElement = expandedElement === element ? null : element"></mat-row>
- <tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="message-row"></tr>
- </table>
-</div>
\ 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.
* limitations under the License.
* ========================LICENSE_END===================================
*/
-import { Component, OnInit, ViewChild } from '@angular/core';
-import { MatSort } from '@angular/material/sort';
-import { Router } from '@angular/router';
-import { XappControlRow } from '../interfaces/app-mgr.types';
-import { AppMgrService } from '../services/app-mgr/app-mgr.service';
-import { ConfirmDialogService } from './../services/ui/confirm-dialog.service';
-import { ErrorDialogService } from './../services/ui/error-dialog.service';
-import { NotificationService } from './../services/ui/notification.service';
-import { ControlAnimations } from './control.animations';
-import { ControlDataSource } from './control.datasource';
+import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-control',
templateUrl: './control.component.html',
- styleUrls: ['./control.component.css'],
- animations: [ControlAnimations.messageTrigger],
+ styleUrls: ['./control.component.css']
})
export class ControlComponent implements OnInit {
- displayedColumns: string[] = ['xapp', 'name', 'status', 'ip', 'port', 'action'];
- dataSource: ControlDataSource;
- @ViewChild(MatSort) sort: MatSort;
-
- constructor(
- private appMgrSvc: AppMgrService,
- private router: Router,
- private confirmDialogService: ConfirmDialogService,
- private errorDialogService: ErrorDialogService,
- private notification: NotificationService) { }
+ constructor() { }
ngOnInit() {
- this.dataSource = new ControlDataSource(this.appMgrSvc, this.sort);
- this.dataSource.loadTable();
- }
-
- controlApp(app: XappControlRow): void {
- const acXappPattern = /[Aa][Dd][Mm][Ii][Ss]{2}[Ii][Oo][Nn]/;
- const anrXappPattern = /[Aa][Nn][Rr]/;
- if (acXappPattern.test(app.xapp)) {
- this.router.navigate(['/ac']);
- } else if (anrXappPattern.test(app.xapp)) {
- this.router.navigate(['/anr']);
- } else {
- this.errorDialogService.displayError('No control available for ' + app.xapp + ' (yet)');
- }
}
-
- undeployApp(app: XappControlRow): void {
- this.confirmDialogService.openConfirmDialog('Are you sure you want to undeploy xApp ' + app.xapp + '?')
- .afterClosed().subscribe(res => {
- if (res) {
- this.appMgrSvc.undeployXapp(app.xapp).subscribe(
- response => {
- this.dataSource.loadTable();
- switch (response.status) {
- case 200:
- this.notification.success('xApp undeployed successfully!');
- break;
- default:
- this.notification.warn('xApp undeploy failed.');
- }
- }
- );
- }
- });
- }
-
}
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.
<mat-icon>home</mat-icon> <span class="nav-caption">Home</span>
</a>
<a mat-list-item routerLink="/catalog" (click)="onSidenavClose()">
- <mat-icon>list</mat-icon> <span class="nav-caption">Catalog</span>
+ <mat-icon>list</mat-icon> <span class="nav-caption">Catalog</span>
</a>
<a mat-list-item routerLink="/control" (click)="onSidenavClose()">
<mat-icon>settings</mat-icon><span class="nav-caption">Control</span>
<a mat-list-item routerLink="/stats" (click)="onSidenavClose()">
<mat-icon>assessment</mat-icon> <span class="nav-caption">Stats</span>
</a>
- <a mat-list-item routerLink="/ran-connection" (click)="onSidenavClose()">
- <mat-icon>cast_connected</mat-icon> <span class="nav-caption">RAN Connection</span>
- </a>
<a mat-list-item routerLink="/admin" (click)="onSidenavClose()">
<mat-icon>assignment_ind</mat-icon> <span class="nav-caption">Admin</span>
</a>
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { E2ManagerService } from '../services/e2-mgr/e2-mgr.service';
-import { NotificationService } from './../services/ui/notification.service';
+import { NotificationService } from '../services/ui/notification.service';
import { ErrorDialogService } from '../services/ui/error-dialog.service';
import { E2SetupRequest } from '../interfaces/e2-mgr.types';
import { HttpErrorResponse } from '@angular/common/http';
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.
limitations under the License.
========================LICENSE_END===================================
-->
-<div class="ranconnect__section">
- <h3 class="ranconnect__header">RAN Connections</h3>
+
+<div class="ran-control__section">
+ <h3 class="ran-control__header">RAN Connections</h3>
<button mat-raised-button (click)="setupRANConnection()">Setup Connection..</button>
<button mat-raised-button color="warn" class="disconnect-all-button"
<mat-spinner></mat-spinner>
</div>
- <table mat-table class="ranconnect-table mat-elevation-z8" [dataSource]="dataSource">
+ <table mat-table class="ran-control-table mat-elevation-z8" [dataSource]="dataSource">
<ng-container matColumnDef="requestType">
<mat-header-cell *matHeaderCellDef>RAN Type</mat-header-cell>
</table>
-</div>
\ No newline at end of file
+</div>
* 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.
* limitations under the License.
* ========================LICENSE_END===================================
*/
- .ranconnect__section {
+ .ran-control__section {
}
-.ranconnect__header {
+.ran-control__header {
text-align: center;
color: #432c85;
font-size: 50px;
transform: translate(149 56);
}
-.ranconnect-table {
+.ran-control-table {
width: 100%;
min-height: 100px;
margin-top: 10px;
--- /dev/null
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * %%
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================LICENSE_END===================================
+ */
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { RanControlComponent } from './ran-control.component';
+
+describe('RanControlComponent', () => {
+ let component: RanControlComponent;
+ let fixture: ComponentFixture<RanControlComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ RanControlComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(RanControlComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
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 { RANConnectionDataSource } from './ran-connection.datasource';
+import { ConfirmDialogService } from '../services/ui/confirm-dialog.service';
+import { NotificationService } from '../services/ui/notification.service';
+import { RANControlDataSource } from './ran-control.datasource';
import { HttpErrorResponse } from '@angular/common/http';
@Component({
- selector: 'app-ran-connection',
- templateUrl: './ran-connection.component.html',
- styleUrls: ['./ran-connection.component.scss']
+ selector: 'control-ran-control',
+ templateUrl: './ran-control.component.html',
+ styleUrls: ['./ran-control.component.scss']
})
-export class RANConnectionComponent implements OnInit {
+export class RanControlComponent implements OnInit {
displayedColumns: string[] = ['requestType', 'ranName', 'ranIp', 'ranPort', 'responseCode', 'timeStamp'];
- dataSource: RANConnectionDataSource;
+ dataSource: RANControlDataSource;
constructor(private e2MgrSvc: E2ManagerService,
private errorSvc: ErrorDialogService,
public dialog: MatDialog) { }
ngOnInit() {
- this.dataSource = new RANConnectionDataSource(this.e2MgrSvc);
+ this.dataSource = new RANControlDataSource(this.e2MgrSvc);
this.dataSource.loadTable();
}
import { E2SetupRequest } from '../interfaces/e2-mgr.types';
import { E2ManagerService } from '../services/e2-mgr/e2-mgr.service';
-export class RANConnectionDataSource extends DataSource<E2SetupRequest> {
+export class RANControlDataSource extends DataSource<E2SetupRequest> {
- private ranConnectSubject = new BehaviorSubject<E2SetupRequest[]>([]);
+ private ranControlSubject = new BehaviorSubject<E2SetupRequest[]>([]);
private loadingSubject = new BehaviorSubject<boolean>(false);
catchError(() => of([])),
finalize(() => this.loadingSubject.next(false))
)
- .subscribe((ranConnect: E2SetupRequest[]) => this.ranConnectSubject.next(ranConnect));
+ .subscribe((ranControl: E2SetupRequest[]) => this.ranControlSubject.next(ranControl));
}
connect(collectionViewer: CollectionViewer): Observable<E2SetupRequest[]> {
- return this.ranConnectSubject.asObservable();
+ return this.ranControlSubject.asObservable();
}
disconnect(collectionViewer: CollectionViewer): void {
- this.ranConnectSubject.complete();
+ this.ranControlSubject.complete();
this.loadingSubject.complete();
}
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.
<mat-icon>stop</mat-icon> Stop</div>
<div style="color: black; size: 1em; text-align: center">
<mat-icon>build</mat-icon>Config</div>
-
+
</div>
<div class="body__container">