X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=dashboard%2Fwebapp-frontend%2Fsrc%2Fapp%2Fservices%2Fapp-mgr%2Fapp-mgr.service.ts;fp=dashboard%2Fwebapp-frontend%2Fsrc%2Fapp%2Fservices%2Fapp-mgr%2Fapp-mgr.service.ts;h=5d89ce467cde1493910a848f231d65f77484e2cf;hb=fa9065384adda531aa66bcf39ffc5ac6513ff4dd;hp=7643da55f460f6af14611863f87854729d75590c;hpb=89f1c3c75b013187d3a59a86b78c2b9ef5dc170e;p=portal%2Fric-dashboard.git diff --git a/dashboard/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts b/dashboard/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts index 7643da55..5d89ce46 100644 --- a/dashboard/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts +++ b/dashboard/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts @@ -20,7 +20,8 @@ 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() @@ -34,20 +35,20 @@ export class AppMgrService { private httpClient: HttpClient) { } - getDeployable(instanceKey: string): Observable { + getDeployable(instanceKey: string): Observable { const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath, 'list'); - return this.httpClient.get(path); + return this.httpClient.get(path); } - getDeployed(instanceKey: string): Observable { + getDeployed(instanceKey: string): Observable { const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.xappsPath); - return this.httpClient.get(path); + return this.httpClient.get(path); } - deployXapp(instanceKey: string, name: string): Observable> { - const xappInfo: XMXappInfo = { name: name }; + deployXapp(instanceKey: string, xappName: string): Observable> { + 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> { @@ -55,15 +56,15 @@ export class AppMgrService { return this.httpClient.delete(path, { observe: 'response' }); } - getConfig(instanceKey: string): Observable { + getConfig(instanceKey: string): Observable { // For demo purpose, pull example config from local - return this.httpClient.get('/assets/mockdata/config.json'); + return this.httpClient.get('/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(path); } - putConfig(instanceKey: string, config: any): Observable> { + putConfig(instanceKey: string, config: XMXappConfig): Observable> { const path = this.dashboardSvc.buildPath(this.component, instanceKey, 'config'); return this.httpClient.put(path, config, { observe: 'response' }); }