X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fcatalog%2Fcatalog.service.ts;h=586df92e0ef214339007712d3db8afc011f4b649;hb=2239b1d982aafe5e7dce4dbbec5100f3e3191249;hp=95b8662478d529072a1ea2bab1c8eb89eed897c4;hpb=e2cbc4d0304646febf7e2cbe0dccdf9840189222;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/catalog/catalog.service.ts b/webapp-frontend/src/app/services/catalog/catalog.service.ts index 95b86624..586df92e 100644 --- a/webapp-frontend/src/app/services/catalog/catalog.service.ts +++ b/webapp-frontend/src/app/services/catalog/catalog.service.ts @@ -1,6 +1,6 @@ /*- * ========================LICENSE_START================================= - * ORAN-OSC + * O-RAN-SC * %% * Copyright (C) 2019 AT&T Intellectual Property and Nokia * %% @@ -20,15 +20,24 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; +import { XMXappInfo } from '../../interfaces/xapp-mgr.types'; @Injectable() export class CatalogService { - - constructor(private http: HttpClient) { + + constructor(private httpClient: HttpClient) { + // injects to variable httpClient } getAll() { - return this.http.get('api/xappmgr/xapps'); + return this.httpClient.get('api/xappmgr/xapps'); + } + + deployXapp(name) { + let xappInfo: XMXappInfo = { + xAppName: name + }; + return this.httpClient.post('api/xappmgr/xapps', xappInfo, { observe: 'response' }); } - + }