* ========================LICENSE_START=================================
* O-RAN-SC
* %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * Copyright (C) 2019 AT&T Intellectual Property
* %%
* 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.
* ========================LICENSE_END===================================
*/
import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
+import { HttpClient, HttpParams } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
import { HttpErrorResponse } from '@angular/common/http';
})
};
+ private basePath = 'api/admin/';
+
constructor(private httpClient: HttpClient) {
// this.loadConfig();
// this.getLoad();
return Math.round((Math.random() * (20 - 0)) + 0);
}
+ // Gets xApp metrics kibana url for the named application
+ getAppMetricsUrl(appName: string) {
+ return this.httpClient.get(this.basePath + 'metrics', {
+ params: new HttpParams()
+ .set('app', appName)
+ });
+ }
+
saveConfig(key: string, value: string) {
if (key === 'jsonURL') {
this.baseJSONServerUrl = value;