Code Review
/
portal
/
ric-dashboard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Show AC app data visualization in new metrics tab
[portal/ric-dashboard.git]
/
webapp-frontend
/
src
/
app
/
services
/
stats
/
stats.service.ts
diff --git
a/webapp-frontend/src/app/services/stats/stats.service.ts
b/webapp-frontend/src/app/services/stats/stats.service.ts
index
e4e667a
..
b611732
100644
(file)
--- a/
webapp-frontend/src/app/services/stats/stats.service.ts
+++ b/
webapp-frontend/src/app/services/stats/stats.service.ts
@@
-18,7
+18,7
@@
* ========================LICENSE_END===================================
*/
import { Injectable } from '@angular/core';
* ========================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';
import { HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
import { HttpErrorResponse } from '@angular/common/http';
@@
-50,6
+50,8
@@
export class StatsService {
})
};
})
};
+ private basePath = 'api/admin/';
+
constructor(private httpClient: HttpClient) {
// this.loadConfig();
// this.getLoad();
constructor(private httpClient: HttpClient) {
// this.loadConfig();
// this.getLoad();
@@
-103,6
+105,14
@@
export class StatsService {
return Math.round((Math.random() * (20 - 0)) + 0);
}
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;
saveConfig(key: string, value: string) {
if (key === 'jsonURL') {
this.baseJSONServerUrl = value;