Match front end E2mgr URL paths to back end 77/977/2
authorLott, Christopher (cl778h) <cl778h@att.com>
Thu, 19 Sep 2019 10:54:21 +0000 (06:54 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Thu, 19 Sep 2019 11:01:41 +0000 (07:01 -0400)
Extend front end to trim whitespace on form inputs.
Bump version to 1.2.1.

Change-Id: I8cb10264148ab51fb123b420bc9c2ad350e093be
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
15 files changed:
a1-med-client/pom.xml
anr-xapp-client/pom.xml
app-mgr-client/pom.xml
docs/release-notes.rst
e2-mgr-client/pom.xml
pom.xml
webapp-backend/pom.xml
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java
webapp-frontend/pom.xml
webapp-frontend/src/app/anr-xapp/anr-edit-ncr-dialog.component.ts
webapp-frontend/src/app/anr-xapp/anr-xapp.component.ts
webapp-frontend/src/app/app-configuration/app-configuration.component.ts
webapp-frontend/src/app/ran-control/ran-connection-dialog.component.ts
webapp-frontend/src/app/services/e2-mgr/e2-mgr.service.ts
webapp-frontend/src/app/user/edit-dashboard-user-dialog/edit-dashboard-user-dialog.component.ts

index edb1b4e..5615ed4 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
        <parent>
                <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
                <artifactId>ric-dash-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
        <!-- This groupId will NOT allow deployment in LF -->
        <groupId>org.o-ran-sc.ric.plt.a1med.client</groupId>
index 975a15b..137985a 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
        <parent>
                <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
                <artifactId>ric-dash-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
        <!-- This groupId will NOT allow deployment in LF -->
        <groupId>org.o-ran-sc.ric.xapp.anr.client</groupId>
index 3c50b61..4efb783 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
        <parent>
                <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
                <artifactId>ric-dash-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
        <!-- This groupId will NOT allow deployment in LF -->
        <groupId>org.o-ran-sc.ric.plt.appmgr.client</groupId>
index b3cc4ca..4fc7952 100644 (file)
 RIC Dashboard Release Notes
 ===========================
 
-Version 1.2.1, ? Aug 2019
+Version 1.2.?, ? 2019
 -------------------------
 * Add EPSDK-FW user management and Portal security
 
+Version 1.2.1, 19 Sep 2019
+--------------------------
+* Repair E2 URLs in front end like endc-setup/endcSetup
+* Trim whitespace in form input strings
+
 Version 1.2.0, 11 Sep 2019
 --------------------------
 * Split URL properties into prefix/suffix parts
index cf9dedc..9082674 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
        <parent>
                <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
                <artifactId>ric-dash-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
        <!-- This groupId will NOT allow deployment in LF -->
        <groupId>org.o-ran-sc.ric.plt.e2mgr.client</groupId>
diff --git a/pom.xml b/pom.xml
index dd13491..61f3f95 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@ limitations under the License.
        <artifactId>ric-dash-parent</artifactId>
        <name>RIC Dashboard project</name>
        <packaging>pom</packaging>
-       <version>1.2.0-SNAPSHOT</version>
+       <version>1.2.1-SNAPSHOT</version>
        <properties>
                <java.version>11</java.version>
                <!-- Properties for the license-maven-plugin in child POMs -->
index d86ba21..0912624 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
        <parent>
                <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
                <artifactId>ric-dash-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
        <artifactId>ric-dash-be</artifactId>
        <name>RIC Dashboard Webapp backend</name>
index 104cb1d..15379be 100644 (file)
@@ -72,15 +72,16 @@ public class E2ManagerController {
        public static final String CONTROLLER_PATH = DashboardConstants.ENDPOINT_PREFIX + "/e2mgr";
        // Dashboard only
        public static final String HEALTH_METHOD = "health";
-       public static final String RAN_METHOD = "/ran";
        public static final String VERSION_METHOD = DashboardConstants.VERSION_METHOD;
        // Keep these consistent with the E2M implementation
-       public static final String NODEB_PREFIX = "/nodeb";
+       /*package*/ static final String NODEB_PREFIX = "/nodeb";
+       public static final String RAN_METHOD = NODEB_PREFIX + "/ran";
        public static final String NODEB_SHUTDOWN_METHOD = NODEB_PREFIX + "/shutdown";
        public static final String NODEB_LIST_METHOD = NODEB_PREFIX + "/ids";
-       public static final String RESET_METHOD = "/reset";
        public static final String ENDC_SETUP_METHOD = NODEB_PREFIX + "/endc-setup";
        public static final String X2_SETUP_METHOD = NODEB_PREFIX + "/x2-setup";
+       // Reset uses prefix, adds a path parameter below
+       public static final String RESET_METHOD = "/reset";
        // Path parameters
        private static final String PP_RANNAME = "ranName";
 
index 69ce3ef..7077e94 100644 (file)
@@ -25,7 +25,7 @@ limitations under the License.
        <parent>
                <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
                <artifactId>ric-dash-parent</artifactId>
-               <version>1.2.0-SNAPSHOT</version>
+               <version>1.2.1-SNAPSHOT</version>
        </parent>
        <artifactId>ric-dash-fe</artifactId>
        <name>RIC Dashboard Webapp frontend</name>
index 24c4811..2c3f2d0 100644 (file)
@@ -58,13 +58,16 @@ export class AnrEditNcrDialogComponent implements OnInit {
     modifyNcr = (ncrFormValue: ANRNeighborCellRelation) => {
         if (this.ncrDialogForm.valid) {
             const ncrm = {} as ANRNeighborCellRelationMod;
-            // there must be a better way
+            // there must be a better way to build the struct
             ncrm.neighborCellNrcgi = ncrFormValue.neighborCellNrcgi;
             ncrm.neighborCellNrpci = ncrFormValue.neighborCellNrpci;
             ncrm.flagNoHo = ncrFormValue.flagNoHo;
             ncrm.flagNoXn = ncrFormValue.flagNoXn;
             ncrm.flagNoRemove = ncrFormValue.flagNoRemove;
-            this.dataService.modifyNcr(ncrFormValue.servingCellNrcgi, ncrFormValue.neighborCellNrpci, ncrm).subscribe((val: any[]) => { },
+            this.dataService.modifyNcr(ncrFormValue.servingCellNrcgi, ncrFormValue.neighborCellNrpci, ncrm).subscribe(
+                (val: any[]) => {
+                    // Success
+                },
                 (error => {
                     this.errorService.displayError('NCR update failed: ' + error.message);
                 })
index 9e25391..eaa2ca3 100644 (file)
@@ -18,7 +18,7 @@
  * ========================LICENSE_END===================================
  */
 
-import { HttpResponse } from '@angular/common/http';
+import { HttpErrorResponse, HttpResponse } from '@angular/common/http';
 import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
 import { MatSort } from '@angular/material';
 import { MatDialog } from '@angular/material/dialog';
@@ -42,10 +42,10 @@ export class AnrXappComponent implements AfterViewInit, OnInit {
 
   dataSource: ANRXappDataSource;
   gNodeBIds: string[];
-  @ViewChild('ggNodeB', {static: true}) ggNodeB: ElementRef;
-  @ViewChild('servingCellNrcgi', {static: true}) servingCellNrcgi: ElementRef;
-  @ViewChild('neighborCellNrpci', {static: true}) neighborCellNrpci: ElementRef;
-  @ViewChild(MatSort, {static: true}) sort: MatSort;
+  @ViewChild('ggNodeB', { static: true }) ggNodeB: ElementRef;
+  @ViewChild('servingCellNrcgi', { static: true }) servingCellNrcgi: ElementRef;
+  @ViewChild('neighborCellNrpci', { static: true }) neighborCellNrpci: ElementRef;
+  @ViewChild(MatSort, { static: true }) sort: MatSort;
 
   displayedColumns = ['cellIdentifierNrcgi', 'neighborCellNrpci', 'neighborCellNrcgi',
     'flagNoHo', 'flagNoXn', 'flagNoRemove', 'action'];
@@ -99,36 +99,39 @@ export class AnrXappComponent implements AfterViewInit, OnInit {
       width: '300px',
       data: ncr
     });
-    dialogRef.afterClosed().subscribe(result => {
-      this.loadNcrtPage();
-    });
+    dialogRef.afterClosed().subscribe(
+      (result: any) => {
+        this.loadNcrtPage();
+      }
+    );
   }
 
   deleteNcr(ncr: ANRNeighborCellRelation): void {
     this.confirmDialogService
       .openConfirmDialog('Are you sure you want to delete this relation?')
-      .afterClosed().subscribe(res => {
-        if (res) {
-          this.loadingDialogService.startLoading("Deleting");
-          this.anrXappService.deleteNcr(ncr.servingCellNrcgi, ncr.neighborCellNrpci)
-            .pipe(
-              finalize(() => this.loadingDialogService.stopLoading())
-            )
-            .subscribe(
-              (response: HttpResponse<Object>) => {
-                switch (response.status) {
-                  case 200:
-                    this.notificationService.success('Delete succeeded!');
-                    break;
-                  default:
-                    this.notificationService.warn('Delete failed.');
-                }
-              },
-              error => {
-                this.errorDialogService.displayError(error.message);
-              });
-        }
-      });
+      .afterClosed().subscribe(
+        (res: any) => {
+          if (res) {
+            this.loadingDialogService.startLoading("Deleting");
+            this.anrXappService.deleteNcr(ncr.servingCellNrcgi, ncr.neighborCellNrpci)
+              .pipe(
+                finalize(() => this.loadingDialogService.stopLoading())
+              )
+              .subscribe(
+                (response: HttpResponse<Object>) => {
+                  switch (response.status) {
+                    case 200:
+                      this.notificationService.success('Delete succeeded!');
+                      break;
+                    default:
+                      this.notificationService.warn('Delete failed.');
+                  }
+                },
+                (error: HttpErrorResponse) => {
+                  this.errorDialogService.displayError(error.message);
+                });
+          }
+        });
   }
 
 }
index 28e9bf7..bacf9ab 100644 (file)
@@ -50,7 +50,7 @@ export class AppConfigurationComponent implements OnInit {
   xappMetadata: any;
   xappConfigSchema: any;
   xappConfigData: any;
-  xappLayout:any;
+  xappLayout: any;
   ngOnInit() {
     this.loadingSubject.next(true);
     this.appMgrService.getConfig()
@@ -58,10 +58,10 @@ export class AppConfigurationComponent implements OnInit {
         finalize(() => this.loadingSubject.next(false))
       )
       .subscribe(
-      (allConfig: any) => {
-        this.loadConfigForm(this.data.name, allConfig)
-      }
-    )
+        (allConfig: any) => {
+          this.loadConfigForm(this.data.name, allConfig)
+        }
+      );
   }
 
   updateconfig(event) {
@@ -78,7 +78,7 @@ export class AppConfigurationComponent implements OnInit {
           this.loadingDialogService.stopLoading();
           this.dialogRef.close();
         })
-    )
+      )
       .subscribe(
         (response: HttpResponse<Object>) => {
           this.notificationService.success('Configuration update succeeded!');
@@ -99,7 +99,7 @@ export class AppConfigurationComponent implements OnInit {
       this.xappMetadata = xappConfig.metadata
       this.xappConfigSchema = xappConfig.descriptor;
       this.xappConfigData = xappConfig.config;
-      this.xappLayout= xappConfig.layout;
+      this.xappLayout = xappConfig.layout;
     } else {
       this.errorDiaglogService.displayError("Cannot find configration data for " + name);
       this.dialogRef.close();
index 4065f44..c10d97e 100644 (file)
@@ -73,11 +73,11 @@ export class RanControlConnectDialogComponent implements OnInit {
     }
     this.processing = true;
     const setupRequest: E2SetupRequest = {
-      ranName: ranFormValue.ranName,
-      ranIp: ranFormValue.ranIp,
-      ranPort: ranFormValue.ranPort
+      ranName: ranFormValue.ranName.trim(),
+      ranIp: ranFormValue.ranIp.trim(),
+      ranPort: ranFormValue.ranPort.trim()
     };
-    this.loadingDialogService.startLoading("Setting up connection ");
+    this.loadingDialogService.startLoading('Setting up connection');
     let observable: Observable<HttpResponse<Object>>;
     if (ranFormValue.ranType === 'endc') {
       observable = this.service.endcSetup(setupRequest);
@@ -91,7 +91,7 @@ export class RanControlConnectDialogComponent implements OnInit {
       .subscribe(
         (response: any) => {
           this.processing = false;
-          this.notifService.success('Connect succeeded!');
+          this.notifService.success('Connect request sent!');
           this.dialogRef.close(true);
         },
         ((her: HttpErrorResponse) => {
@@ -101,7 +101,7 @@ export class RanControlConnectDialogComponent implements OnInit {
           if (her.error && her.error.message) {
             msg = her.error.message;
           }
-          this.errorService.displayError('Connect failed: ' + msg);
+          this.errorService.displayError('Connect request failed: ' + msg);
           // keep the dialog open
         })
       );
index e40ee60..a5fe9e9 100644 (file)
@@ -30,7 +30,7 @@ import { DashboardSuccessTransport } from '../../interfaces/dashboard.types';
 
 export class E2ManagerService {
 
-  private basePath = 'api/e2mgr/';
+  private basePath = 'api/e2mgr/nodeb/';
 
   constructor(private httpClient: HttpClient) {
     // injects to variable httpClient
@@ -61,7 +61,7 @@ export class E2ManagerService {
    * @returns Observable. On success there is no data, only a code.
    */
   endcSetup(req: E2SetupRequest): Observable<HttpResponse<Object>> {
-    return this.httpClient.post(this.basePath + 'endcSetup', req, { observe: 'response' });
+    return this.httpClient.post(this.basePath + 'endc-setup', req, { observe: 'response' });
   }
 
   /**
@@ -69,7 +69,7 @@ export class E2ManagerService {
    * @returns Observable. On success there is no data, only a code.
    */
   x2Setup(req: E2SetupRequest): Observable<HttpResponse<Object>> {
-    return this.httpClient.post(this.basePath + 'x2Setup', req, { observe: 'response' });
+    return this.httpClient.post(this.basePath + 'x2-setup', req, { observe: 'response' });
   }
 
   /**
@@ -77,7 +77,7 @@ export class E2ManagerService {
    * @returns Observable with body.
    */
   nodebPut(): Observable<any> {
-    return this.httpClient.put((this.basePath + 'nodebShutdownPut'), { observe: 'body' });
+    return this.httpClient.put((this.basePath + 'shutdown'), { observe: 'body' });
   }
 
 }
index f8f50de..9933a66 100644 (file)
@@ -26,7 +26,7 @@ import { ErrorDialogService } from '../../services/ui/error-dialog.service';
 
 
 @Component({
-  selector: 'edit-app-dashboard-user-dialog',
+  selector: 'rd-edit-app-dashboard-user-dialog',
   templateUrl: './edit-dashboard-user-dialog.component.html',
   styleUrls: ['./edit-dashboard-user-dialog.component.scss']
 })