X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fcontrol%2Fcontrol.service.ts;h=24b4024a9184252d0e5ecac309e5e013ec9268a6;hb=a4c7cdd075d372de0ab352abc46359d88a570d90;hp=41819c444f192b7f2c1120ff58e3f6a6b46c2573;hpb=480b67bbc8accad983e84d8d0e4e74b3fae2802d;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/control/control.service.ts b/webapp-frontend/src/app/services/control/control.service.ts index 41819c44..24b4024a 100644 --- a/webapp-frontend/src/app/services/control/control.service.ts +++ b/webapp-frontend/src/app/services/control/control.service.ts @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,28 +26,27 @@ export class ControlService { constructor(private http: HttpClient) { } - getxAppInstances(xAppInstances) { + getxAppInstances(xAppInstances) { return this.http.get('api/xappmgr/xapps').subscribe( (val: any[]) => { xAppInstances(this.fetchInstance(val)); - } + } ); - } undeployxApp(xapp) { - return this.http.delete(('api/xappmgr/xapps/' + xapp),{ observe: 'response' }) + return this.http.delete(('api/xappmgr/xapps/' + xapp), { observe: 'response' }); } fetchInstance(allxappdata) { - var xAppInstances = [] - for (const xappindex in allxappdata) { - var instancelist = allxappdata[xappindex].instances; + const xAppInstances = []; + for (const xappindex in allxappdata) { + const instancelist = allxappdata[xappindex].instances; for (const instanceindex in instancelist) { - var instance = instancelist[instanceindex]; + const instance = instancelist[instanceindex]; instance.xapp = allxappdata[xappindex].name; xAppInstances.push(instance); - } + } } return xAppInstances; }