X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fapp-control%2Fapp-control.datasource.ts;h=76c421686b3888504ecc367d85f9785997800afe;hb=b7d7982bbfbf3a1333feb8b811f99497752d3722;hp=e97dc6374f6b67659c6694511171a176a4ed60c4;hpb=53f1fcf033e3a166d7203e0a1c5e0971f9c6bc16;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/app-control/app-control.datasource.ts b/webapp-frontend/src/app/app-control/app-control.datasource.ts index e97dc637..76c42168 100644 --- a/webapp-frontend/src/app/app-control/app-control.datasource.ts +++ b/webapp-frontend/src/app/app-control/app-control.datasource.ts @@ -41,7 +41,8 @@ export class AppControlDataSource extends DataSource { public rowCount = 1; // hide footer during intial load private emptyInstances: XMXappInstance = - { ip: null, + { + ip: null, name: null, port: null, status: null, @@ -55,18 +56,18 @@ export class AppControlDataSource extends DataSource { super(); } - loadTable() { + loadTable(instanceKey: string) { this.loadingSubject.next(true); - this.appMgrSvc.getDeployed() + this.appMgrSvc.getDeployed(instanceKey) .pipe( - catchError( (her: HttpErrorResponse) => { + catchError((her: HttpErrorResponse) => { console.log('AppControlDataSource failed: ' + her.message); this.notificationService.error('Failed to get applications: ' + her.message); return of([]); }), finalize(() => this.loadingSubject.next(false)) ) - .subscribe( (xApps: XMDeployedApp[]) => { + .subscribe((xApps: XMDeployedApp[]) => { this.rowCount = xApps.length; const flattenedApps = this.flatten(xApps); this.appControlSubject.next(flattenedApps); @@ -88,7 +89,7 @@ export class AppControlDataSource extends DataSource { this.loadingSubject.complete(); } - private flatten(allxappdata: XMDeployedApp[]): XappControlRow[] { + private flatten(allxappdata: XMDeployedApp[]): XappControlRow[] { const xAppInstances: XappControlRow[] = []; for (const xapp of allxappdata) { if (!xapp.instances) {