1 import { HttpClient } from '@angular/common/http';
2 import { Injectable } from '@angular/core';
5 export class TablePerformanceCounterService {
7 private url = 'api/perf_counters';
9 constructor(private http: HttpClient) { }
12 return this.http.get(this.url)
14 .then((resp: object): object => {
19 get(service_type: string, service_id: string) {
20 const serviceType = service_type.replace('-', '_');
22 return this.http.get(`${this.url}/${serviceType}/${service_id}`)
24 .then((resp: object): Array<object> => {
25 return resp['counters'];