RIC signal gNB eNB, BE get, post call 92/92/11
authorSarkar, Anand (as0481) <as0481@att.com>
Fri, 26 Apr 2019 19:32:40 +0000 (15:32 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Fri, 10 May 2019 14:45:21 +0000 (10:45 -0400)
Show new columns with result code etc.

Change-Id: If7d9b7a10b3702954455fb4055369caa189a0fdc
Issue-Id: RICPLT-954
Signed-off-by: Sarkar, Anand (as0481) <asarkar@research.att.com>
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
14 files changed:
docs/release-notes.rst
webapp-frontend/.gitignore
webapp-frontend/package-lock.json
webapp-frontend/package.json
webapp-frontend/src/app/app-routing.module.ts
webapp-frontend/src/app/app.module.ts
webapp-frontend/src/app/navigation/sidenav-list/sidenav-list.component.html
webapp-frontend/src/app/services/signal/signal.service.spec.ts [new file with mode: 0644]
webapp-frontend/src/app/services/signal/signal.service.ts [new file with mode: 0644]
webapp-frontend/src/app/signal/signal.component.css [new file with mode: 0644]
webapp-frontend/src/app/signal/signal.component.html [new file with mode: 0644]
webapp-frontend/src/app/signal/signal.component.ranconnect-dialog.html [new file with mode: 0644]
webapp-frontend/src/app/signal/signal.component.spec.ts [new file with mode: 0644]
webapp-frontend/src/app/signal/signal.component.ts [new file with mode: 0644]

index a56d816..c496010 100644 (file)
 RIC Dashboard Release Notes
 ===========================
 
-Version 1.0.2, 9 May 2019
--------------------------
+Version 1.0.2, 10 May 2019
+--------------------------
 * Update A1 mediator client to version 0.4.0
 * Add E2 response message with timestamp and status code
 * Fetch xAPP instance status information from xAPP Manager and display in dashboard
+* Allow the user to initiate an E2 (X2) connection between RIC and gNB/eNB
 
 Version 1.0.1, 6 May 2019
 -------------------------
index a473c81..4cfece3 100644 (file)
@@ -15,6 +15,7 @@
 /.settings
 /target/
 /.mvn/wrapper/maven-wrapper.jar
+/.vscode
 
 ### STS ###
 .apt_generated
index 82dfbed..add9d36 100644 (file)
       }
     },
     "rxjs-compat": {
-      "version": "6.4.0",
-      "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.4.0.tgz",
-      "integrity": "sha512-eo/O8RS83hJdJukCtA+IF6qnqa8FPOuVo+OPCzgVi+dbTle9KCdNv97IcQO0WwNVik7DJLKmf0F8uwzc0q40vw=="
+      "version": "6.3.3",
+      "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.3.3.tgz",
+      "integrity": "sha512-caGN7ixiabHpOofginKEquuHk7GgaCrC7UpUQ9ZqGp80tMc68msadOeP/2AKy2R4YJsT1+TX5GZCtxO82qWkyA=="
     },
     "safe-buffer": {
       "version": "5.1.2",
index 3cf535d..9b4810e 100644 (file)
@@ -32,8 +32,8 @@
     "ng2-charts": "^1.6.0",
     "ng2-completer": "^2.0.8",
     "ng2-smart-table": "1.3.5",
-    "rxjs": "~6.3.3",
-    "rxjs-compat": "^6.4.0",
+    "rxjs": "6.3.3",
+    "rxjs-compat": "6.3.3",
     "tslib": "^1.9.0",
     "zone.js": "~0.8.26"
   },
     "ts-node": "~7.0.0",
     "tslint": "~5.11.0",
     "typescript": "~3.2.2"
+  },
+  "comments": {
+    "dependencies": {
+      "rxjs": "Its version needs to be same with rxjs-compat, otherwise apparently build is failing"
+    }
   }
 }
index 52d7558..3620c0e 100644 (file)
@@ -23,6 +23,7 @@ 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 { SignalComponent } from './signal/signal.component';
 import { StatsComponent } from './stats/stats.component';
 import { AdminComponent } from './admin/admin.component';
 import { XappComponent } from './xapp/xapp.component';
@@ -32,6 +33,7 @@ const routes: Routes = [
     {path: 'login', component: LoginComponent},
     {path: 'catalog', component: CatalogComponent},
     {path: 'control', component: ControlComponent},
+    {path: 'signal', component: SignalComponent},
     {path: 'stats', component: StatsComponent},
     {path: 'admin', component: AdminComponent},
     {path: 'xapp', component: XappComponent},
index 4a84c85..19d6856 100644 (file)
@@ -21,7 +21,7 @@ import { BrowserModule } from '@angular/platform-browser';
 // tslint:disable-next-line:max-line-length
 import { MatIconModule, MatCardModule, MatListModule, MatSidenavModule,
     MatButtonToggleModule, MatSliderModule, MatGridListModule, MatSlideToggleModule,
-    MatExpansionModule, MatTabsModule } from '@angular/material';
+    MatExpansionModule, MatTabsModule, MatDialogModule,  MatFormFieldModule, MatButtonModule, MatInputModule} from '@angular/material';
 import { BrowserAnimationsModule} from '@angular/platform-browser/animations';
 import { NgModule } from '@angular/core';
 import { Ng2SmartTableModule } from 'ng2-smart-table';
@@ -37,8 +37,10 @@ import { UiService} from './services/ui/ui.service';
 import { AdminService} from './services/admin/admin.service';
 import { CatalogService} from './services/catalog/catalog.service';
 import { ControlService} from './services/control/control.service';
+import { SignalService} from './services/signal/signal.service';
 import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
 import { ControlComponent } from './control/control.component';
+import { SignalComponent, AppRANConnectDialog} from './signal/signal.component';
 import { StatsComponent } from './stats/stats.component';
 import { AdminComponent } from './admin/admin.component';
 import { CatalogCardComponent} from './ui/catalog-card/catalog-card.component';
@@ -47,7 +49,7 @@ import { StatCardComponent} from './ui/stat-card/stat-card.component';
 import { ModalEventComponent } from './ui/modal-event/modal-event.component';
 import { XappComponent } from './xapp/xapp.component';
 import { ConfigEventComponent } from './ui/config-event/config-event.component';
-import { MatDialogModule } from '@angular/material';
+
 
 @NgModule({
   declarations: [
@@ -59,12 +61,14 @@ import { MatDialogModule } from '@angular/material';
     ControlCardComponent,
     StatCardComponent,
     ControlComponent,
+    SignalComponent,
     StatsComponent,
     AdminComponent,
     ModalEventComponent,
     XappComponent,
     ConfigEventComponent,
     AppCatalogDeployDialog,
+    AppRANConnectDialog
   ],
     imports: [
     BrowserModule,
@@ -72,6 +76,7 @@ import { MatDialogModule } from '@angular/material';
     ChartsModule,
     AppRoutingModule,
     FormsModule,
+    MatDialogModule,
     ReactiveFormsModule,
     MatButtonToggleModule,
     MatExpansionModule,
@@ -83,11 +88,15 @@ import { MatDialogModule } from '@angular/material';
     MatSidenavModule,
     MatSlideToggleModule,
     MatTabsModule,
+    MatFormFieldModule,
+    MatButtonModule,
+    MatInputModule,
     Ng2SmartTableModule,
     MDBBootstrapModule.forRoot(),
   ],
     exports: [
-    MatDialogModule, 
+    FormsModule,
+    MatDialogModule,
     MatButtonToggleModule,
     MatExpansionModule,
     MatSliderModule,
@@ -98,16 +107,22 @@ import { MatDialogModule } from '@angular/material';
     MatSidenavModule,
     MatSlideToggleModule,
     MatTabsModule,
+    MatFormFieldModule,
+    MatButtonModule,
+    MatInputModule
     ],
     entryComponents: [
     AppCatalogDeployDialog,
+    AppRANConnectDialog
     ],
   providers: [
       UiService,
       AdminService,
       CatalogService,
       ControlService,
+      SignalService
     ],
   bootstrap: [AppComponent]
 })
-export class AppModule { }
+export class AppModule { };
+
index 68f95ae..c6a8c6c 100644 (file)
   <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="/signal" (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>   
+      <mat-icon>assignment_ind</mat-icon> <span class="nav-caption">Admin</span>
   </a>
 </mat-nav-list>
diff --git a/webapp-frontend/src/app/services/signal/signal.service.spec.ts b/webapp-frontend/src/app/services/signal/signal.service.spec.ts
new file mode 100644 (file)
index 0000000..d454ff3
--- /dev/null
@@ -0,0 +1,31 @@
+/*-
+ * ========================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 { TestBed } from '@angular/core/testing';
+
+import { SignalService } from './signal.service';
+
+describe('CatalogService', () => {
+  beforeEach(() => TestBed.configureTestingModule({}));
+
+  it('should be created', () => {
+    const service: SignalService = TestBed.get(SignalService);
+    expect(service).toBeTruthy();
+  });
+});
diff --git a/webapp-frontend/src/app/services/signal/signal.service.ts b/webapp-frontend/src/app/services/signal/signal.service.ts
new file mode 100644 (file)
index 0000000..4b1024a
--- /dev/null
@@ -0,0 +1,42 @@
+/*-
+ * ========================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 { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs';
+
+@Injectable()
+export class SignalService {
+  
+  constructor(private http: HttpClient) {
+  }
+
+  getAll() {
+    return this.http.get('api/e2mgr/setup');
+  }
+
+  x2Setup(req) {
+    return this.http.post('api/e2mgr/x2Setup', req);
+  }
+
+  endcSetup(req) {
+    return this.http.post('api/e2mgr/endcSetup', req);
+  }
+
+}
diff --git a/webapp-frontend/src/app/signal/signal.component.css b/webapp-frontend/src/app/signal/signal.component.css
new file mode 100644 (file)
index 0000000..c30bb3c
--- /dev/null
@@ -0,0 +1,45 @@
+/*-
+ * ========================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 {
+    position: relative;
+    top: -50px;
+}
+
+.control__header {
+    text-align: center;
+    color: #432c85;
+    font-size: 50px;
+    font-weight: 200;
+    letter-spacing: .1em;
+    transform: translate(149 56);
+}
+
+:host /deep/ ng2-smart-table tbody > tr > td{
+  text-align: left;
+}
+
+:host /deep/ ng2-smart-table thead th{
+  text-align: left;
+}
+
+/* used to place form fields on separate lines/rows in dialog */
+.input-display-block {
+  display: block;
+}
diff --git a/webapp-frontend/src/app/signal/signal.component.html b/webapp-frontend/src/app/signal/signal.component.html
new file mode 100644 (file)
index 0000000..9b9fa16
--- /dev/null
@@ -0,0 +1,26 @@
+<!--
+  ========================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="control__section">
+    <h3 class="control__header">RAN Connection</h3>
+    <button mat-raised-button (click)="openRanConnectDialog()">Connect</button>  
+    <ng2-smart-table [settings]="settings" [source]="source">
+    </ng2-smart-table>
+    <app-modal-event hidden></app-modal-event>
+</div>
diff --git a/webapp-frontend/src/app/signal/signal.component.ranconnect-dialog.html b/webapp-frontend/src/app/signal/signal.component.ranconnect-dialog.html
new file mode 100644 (file)
index 0000000..715943c
--- /dev/null
@@ -0,0 +1,40 @@
+<!--
+  ========================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 mat-dialog-title>
+    Setup RAN Connection
+</div>
+
+<div mat-dialog-content>
+  <mat-form-field class="input-display-block">
+    <input matInput placeholder="eNB/gNB Name" [(ngModel)]="data.ranName">
+  </mat-form-field>
+  <mat-form-field class="input-display-block">
+    <input matInput placeholder="IP" [(ngModel)]="data.ranIp">
+  </mat-form-field>
+  <mat-form-field class="input-display-block">
+    <input matInput placeholder="Port" [(ngModel)]="data.ranPort">
+  </mat-form-field>
+</div>
+ <div mat-dialog-actions class="modal-footer justify-content-center">
+  <button class="mat-raised-button" (click)="close()">Cancel</button> 
+  <button class="mat-raised-button mat-primary" (click)="connectRAN()">Connect</button>
+</div>
diff --git a/webapp-frontend/src/app/signal/signal.component.spec.ts b/webapp-frontend/src/app/signal/signal.component.spec.ts
new file mode 100644 (file)
index 0000000..a0d2914
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * ========================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 { SignalComponent } from './signal.component';
+
+describe('SignalComponent', () => {
+  let component: SignalComponent;
+  let fixture: ComponentFixture<SignalComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SignalComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SignalComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/webapp-frontend/src/app/signal/signal.component.ts b/webapp-frontend/src/app/signal/signal.component.ts
new file mode 100644 (file)
index 0000000..a3ad5a2
--- /dev/null
@@ -0,0 +1,131 @@
+/*-
+ * ========================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, Inject } from '@angular/core';
+import { LocalDataSource } from 'ng2-smart-table';
+import { SignalService } from '../services/signal/signal.service';
+import { Router } from '@angular/router';
+import { MatDialog, MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
+import {MatFormFieldModule} from '@angular/material';
+import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs/Rx';
+
+export interface DialogData {
+    ranName: string;
+    ranIp: number;
+    ranPort: number;
+}
+
+@Component({
+    selector: 'app-signal',
+    templateUrl: 'signal.component.html',
+    styleUrls: ['signal.component.css']
+})
+export class SignalComponent {
+
+    settings = {
+        hideSubHeader: true,
+        actions: {
+            columnTitle: 'Actions',
+            add: false,
+            edit: false,
+            delete: false,
+            position: 'right'
+        },
+        columns: {
+            requestType: {
+                title: 'Request Type',
+                type: 'string',
+            },
+            ranName: {
+                title: 'eNodeB/gNodeB Name',
+                type: 'string',
+            },
+            ranIp: {
+                title: 'IP',
+                type: 'number',
+            },
+            ranPort: {
+                title: 'Port',
+                type: 'number',
+            },
+            responseCode: {
+                title: 'Response',
+                type: 'number',
+            },
+            timeStamp: {
+                title: 'Time Stamp',
+                type: 'string',
+            }
+        }
+    };
+
+    source: LocalDataSource = new LocalDataSource();
+
+    ranName: string;
+
+    ranIp: number;
+
+    ranPort: number;
+
+    constructor(private service: SignalService, public dialog: MatDialog, private http: HttpClient) {
+        this.service.getAll().subscribe((val: any[]) => this.source.load(val));
+    }
+
+    openRanConnectDialog() {
+
+        const dialogRef = this.dialog.open(AppRANConnectDialog,  {
+            width: '450px',
+            data: {ranName: this.ranName, ranIp: this.ranIp, ranPort: this.ranPort}
+    })
+
+        dialogRef.afterClosed().subscribe(result => {
+            this.service.getAll().subscribe((val: any[]) => this.source.load(val));
+        });
+
+    }
+}
+
+@Component({
+    selector: 'app-signal-ranconnect-dialog',
+    templateUrl: 'signal.component.ranconnect-dialog.html',
+    styleUrls: ['signal.component.css']
+})
+
+export class AppRANConnectDialog implements OnInit {
+
+    constructor(public dialogRef: MatDialogRef<AppRANConnectDialog>,
+          private service: SignalService,
+          @Inject(MAT_DIALOG_DATA) public data: DialogData) {
+    }
+
+    ngOnInit() {
+    }
+
+    close() {
+        this.dialogRef.close();
+    }
+
+    connectRAN(): void {
+        this.service.x2Setup(this.data).subscribe((val: any[]) => {});
+        this.dialogRef.close();
+    }
+
+}