Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | import { Injectable } from '@angular/core'; |
| 2 | import {HttpClient} from "@angular/common/http"; |
| 3 | import {Observable} from "rxjs/Observable"; |
| 4 | import {Constants} from "../../utils/constants"; |
| 5 | import {ExternalComponentStatus} from "../../models/externalComponentStatus"; |
| 6 | |
| 7 | @Injectable() |
| 8 | export class HealthStatusService { |
| 9 | |
| 10 | constructor(private _http: HttpClient) { |
| 11 | } |
| 12 | |
| 13 | getProbe(): Observable<Array<ExternalComponentStatus>> { |
| 14 | let pathQuery = Constants.Path.SERVICES_PROBE_PATH; |
| 15 | return this._http.get<Array<ExternalComponentStatus>>(pathQuery).map(res => res); |
| 16 | } |
| 17 | } |