X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fapp-mgr%2Fapp-mgr.service.ts;h=33dd1cb6829a6f7da5e01e1f18262e89a3635c32;hb=refs%2Fchanges%2F47%2F647%2F12;hp=10683aefa8260b59de9ada7939387ad8b038bd1f;hpb=1be4d77f0cd2d00da3ed33e21805f3c1abcac272;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts b/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts index 10683aef..33dd1cb6 100644 --- a/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts +++ b/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts @@ -18,7 +18,7 @@ * ========================LICENSE_END=================================== */ import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; +import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { XMXappInfo, XMDeployableApp, XMDeployedApp } from '../../interfaces/app-mgr.types'; @@ -39,13 +39,23 @@ export class AppMgrService { return this.httpClient.get(this.basePath); } - deployXapp(name: string) { + deployXapp(name: string): Observable> { const xappInfo: XMXappInfo = { name: name }; return this.httpClient.post(this.basePath, xappInfo, { observe: 'response' }); } - undeployXapp(name: string) { + undeployXapp(name: string): Observable> { return this.httpClient.delete((this.basePath + '/' + name), { observe: 'response' }); } + getConfig(): Observable{ + return this.httpClient.get("/assets/mockdata/config.json"); + //return this.httpClient.get((this.basePath + '/config')); + } + + putConfig(config: any): Observable> { + return this.httpClient.post((this.basePath + '/config' ), config, { observe: 'response' }); + } + + }