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>
<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>
<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>
<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>
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
<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>
<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 -->
<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>
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";
<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>
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);
})
* ========================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';
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'];
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);
+ });
+ }
+ });
}
}
xappMetadata: any;
xappConfigSchema: any;
xappConfigData: any;
- xappLayout:any;
+ xappLayout: any;
ngOnInit() {
this.loadingSubject.next(true);
this.appMgrService.getConfig()
finalize(() => this.loadingSubject.next(false))
)
.subscribe(
- (allConfig: any) => {
- this.loadConfigForm(this.data.name, allConfig)
- }
- )
+ (allConfig: any) => {
+ this.loadConfigForm(this.data.name, allConfig)
+ }
+ );
}
updateconfig(event) {
this.loadingDialogService.stopLoading();
this.dialogRef.close();
})
- )
+ )
.subscribe(
(response: HttpResponse<Object>) => {
this.notificationService.success('Configuration update succeeded!');
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();
}
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);
.subscribe(
(response: any) => {
this.processing = false;
- this.notifService.success('Connect succeeded!');
+ this.notifService.success('Connect request sent!');
this.dialogRef.close(true);
},
((her: HttpErrorResponse) => {
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
})
);
export class E2ManagerService {
- private basePath = 'api/e2mgr/';
+ private basePath = 'api/e2mgr/nodeb/';
constructor(private httpClient: HttpClient) {
// injects to variable httpClient
* @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' });
}
/**
* @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' });
}
/**
* @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' });
}
}
@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']
})