<parent>
<groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</parent>
<!-- This groupId will NOT allow deployment in LF -->
<groupId>org.o-ran-sc.ric-plt.appmgr.client</groupId>
<parent>
<groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-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>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-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>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</parent>
<!-- reuse parent groupId -->
<artifactId>ric-dash-be</artifactId>
<parent>
<groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
</parent>
<!-- reuse parent groupId -->
<artifactId>ric-dash-fe</artifactId>
import { merge } from 'rxjs';
import { of } from 'rxjs/observable/of';
import { catchError, finalize, map } from 'rxjs/operators';
-import { XappControlRow, XMDeployedApp, XMXappInstance } from '../interfaces/app-mgr.types';
+import { XappControlRow, XMXapp, XMXappInstance } from '../interfaces/app-mgr.types';
import { AppMgrService } from '../services/app-mgr/app-mgr.service';
import { NotificationService } from '../services/ui/notification.service';
status: null,
rxMessages: [],
txMessages: [],
+ policies: [],
};
constructor(private appMgrSvc: AppMgrService,
}),
finalize(() => this.loadingSubject.next(false))
)
- .subscribe((xApps: XMDeployedApp[]) => {
+ .subscribe((xApps: XMXapp[]) => {
this.rowCount = xApps.length;
const flattenedApps = this.flatten(xApps);
this.appControlSubject.next(flattenedApps);
this.loadingSubject.complete();
}
- private flatten(allxappdata: XMDeployedApp[]): XappControlRow[] {
+ private flatten(allxappdata: XMXapp[]): XappControlRow[] {
const xAppInstances: XappControlRow[] = [];
for (const xapp of allxappdata) {
if (!xapp.instances) {
import { Subscription } from 'rxjs';
import { finalize } from 'rxjs/operators';
import { RicInstance } from '../interfaces/dashboard.types';
-import { XMDeployableApp } from '../interfaces/app-mgr.types';
+import { XMXapp } from '../interfaces/app-mgr.types';
import { AppMgrService } from '../services/app-mgr/app-mgr.service';
import { InstanceSelectorService } from '../services/instance-selector/instance-selector.service';
import { LoadingDialogService } from '../services/ui/loading-dialog.service';
this.instanceChange.unsubscribe();
}
- onConfigureApp(xapp: XMDeployableApp): void {
+ onConfigureApp(xapp: XMXapp): void {
if (this.darkMode) {
this.panelClass = 'dark-theme';
} else {
});
}
- onDeployApp(app: XMDeployableApp): void {
+ onDeployApp(app: XMXapp): void {
this.confirmDialogService.openConfirmDialog('Deploy application ' + app.name + '?')
.afterClosed().subscribe((res: boolean) => {
if (res) {
import { of } from 'rxjs/observable/of';
import { catchError, finalize, map } from 'rxjs/operators';
import { AppMgrService } from '../services/app-mgr/app-mgr.service';
-import { XMDeployableApp } from '../interfaces/app-mgr.types';
+import { XMXapp } from '../interfaces/app-mgr.types';
import { NotificationService } from '../services/ui/notification.service';
-export class CatalogDataSource extends DataSource<XMDeployableApp> {
+export class CatalogDataSource extends DataSource<XMXapp> {
- private catalogSubject = new BehaviorSubject<XMDeployableApp[]>([]);
+ private catalogSubject = new BehaviorSubject<XMXapp[]>([]);
private loadingSubject = new BehaviorSubject<boolean>(false);
public loading$ = this.loadingSubject.asObservable();
public rowCount = 1; // hide footer during intial load
}),
finalize(() => this.loadingSubject.next(false))
)
- .subscribe((xApps: XMDeployableApp[]) => {
+ .subscribe((xApps: XMXapp[]) => {
this.rowCount = xApps.length;
this.catalogSubject.next(xApps);
});
}
- connect(collectionViewer: CollectionViewer): Observable<XMDeployableApp[]> {
+ connect(collectionViewer: CollectionViewer): Observable<XMXapp[]> {
const dataMutations = [
this.catalogSubject.asObservable(),
this.sort.sortChange
this.loadingSubject.complete();
}
- private getSortedData(data: XMDeployableApp[]) {
+ private getSortedData(data: XMXapp[]) {
if (!this.sort.active || this.sort.direction === '') {
return data;
}
- return data.sort((a: XMDeployableApp, b: XMDeployableApp) => {
+ return data.sort((a: XMXapp, b: XMXapp) => {
const isAsc = this.sort.direction === 'asc';
switch (this.sort.active) {
case 'name': return this.compare(a.name, b.name, isAsc);
* ========================LICENSE_END===================================
*/
-// Models of data used by the App Manager
+// Models of data used by the App Manager.
+// TS interface names are Java class names plus XM prefix.
-export interface XMSubscription {
- eventType: string;
- id: string;
- maxRetries: number;
- retryTimer: number;
- targetUrl: string;
+export interface XMConfigMetadata {
+ xappName: string;
+ namespace: string;
}
-/**
- * Name is the only required field
- */
-export interface XMXappInfo {
+export interface XMXappConfig {
+ metadata: XMConfigMetadata;
+ config: Object;
+}
+
+export interface XMAllXappConfig {
+ [position: number]: XMXappConfig;
+}
+
+export interface XMConfigValidationError {
+ field: string;
+ error: string;
+}
+
+export interface XMConfigValidationErrors {
+ [position: number]: XMConfigValidationError;
+}
+
+export interface XMAppTransport {
name: string;
- configName?: string;
- namespace?: string;
- serviceName?: string;
- imageRepo?: string;
- hostname?: string;
+ version: string;
+}
+
+export interface XMDashboardDeployableXapps {
+ [position: number]: XMAppTransport;
}
export interface XMXappInstance {
status: string;
rxMessages: Array<string>;
txMessages: Array<string>;
+ policies: Array<number>;
}
-export interface XMDeployableApp {
+export interface XMXapp {
name: string;
+ status: string; // actually an enum
version: string;
+ instances: Array<XMXappInstance>;
}
-export interface XMDeployedApp {
- name: string;
- status: string;
- version: string;
- instances: Array<XMXappInstance>;
+export interface XMAllDeployedXapps {
+ [postion: number]: XMXapp;
+}
+
+/**
+ * xappName is the only required field
+ */
+export interface XMXappDescriptor {
+ xappName: string;
+ helmVersion?: string;
+ releaseName?: string;
+ namespace?: string;
+ overrideFile?: object;
}
export interface XappControlRow {
}
export interface AppStats {
- instanceKey: string
+ instanceKey: string;
statsDetails: StatsDetails;
}
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
-import { XMDeployableApp, XMDeployedApp, XMXappInfo } from '../../interfaces/app-mgr.types';
+import { XMAllDeployedXapps, XMAllXappConfig, XMDashboardDeployableXapps,
+ XMXappConfig, XMXappDescriptor } from '../../interfaces/app-mgr.types';
import { DashboardService } from '../dashboard/dashboard.service';
@Injectable()
private httpClient: HttpClient) {
}
- getDeployable(instanceKey: string): Observable<XMDeployableApp[]> {
+ getDeployable(instanceKey: string): Observable<XMDashboardDeployableXapps> {
const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath, 'list');
- return this.httpClient.get<XMDeployableApp[]>(path);
+ return this.httpClient.get<XMDashboardDeployableXapps>(path);
}
- getDeployed(instanceKey: string): Observable<XMDeployedApp[]> {
+ getDeployed(instanceKey: string): Observable<XMAllDeployedXapps> {
const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath);
- return this.httpClient.get<XMDeployedApp[]>(path);
+ return this.httpClient.get<XMAllDeployedXapps>(path);
}
- deployXapp(instanceKey: string, name: string): Observable<HttpResponse<Object>> {
- const xappInfo: XMXappInfo = { name: name };
+ deployXapp(instanceKey: string, xappName: string): Observable<HttpResponse<Object>> {
+ const xappDescriptor: XMXappDescriptor = { xappName: xappName };
const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath);
- return this.httpClient.post(path, xappInfo, { observe: 'response' });
+ return this.httpClient.post(path, xappDescriptor, { observe: 'response' });
}
undeployXapp(instanceKey: string, name: string): Observable<HttpResponse<Object>> {
return this.httpClient.delete(path, { observe: 'response' });
}
- getConfig(instanceKey: string): Observable<any[]> {
+ getConfig(instanceKey: string): Observable<XMAllXappConfig> {
// For demo purpose, pull example config from local
- return this.httpClient.get<any[]>('/assets/mockdata/config.json');
+ return this.httpClient.get<XMAllXappConfig>('/assets/mockdata/config.json');
// Once Xapp manager contains layout, should call backend to get xapp config
// const path = this.dashboardSvc.buildPath(this.component, instanceKey, 'config');
// return this.httpClient.get<any[]>(path);
}
- putConfig(instanceKey: string, config: any): Observable<HttpResponse<Object>> {
+ putConfig(instanceKey: string, config: XMXappConfig): Observable<HttpResponse<Object>> {
const path = this.dashboardSvc.buildPath(this.component, instanceKey, 'config');
return this.httpClient.put(path, config, { observe: 'response' });
}
RIC Dashboard Release Notes
===========================
+Version 2.0.2, 18 May 2020
+--------------------------
+* Repair App Manager data models in webapp frontend
+
Version 2.0.1, 30 Apr 2020
--------------------------
* Update and relocate the theme selector button