blob: d4eba260a40962c22f78ea498515d79acbc7fb3a [file] [log] [blame]
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03001import { Injectable } from '@angular/core';
2import { HttpClient } from '@angular/common/http';
3import 'rxjs/add/operator/map';
4import { Constants } from '../shared/utils/constants';
5import { VidConfiguration } from '../configuration/vid.configuration';
6
7@Injectable()
8export class SdcService {
9
10
11 constructor (private http: HttpClient) {
12 }
13
14 public getServicesModels(): any {
15 let pathQuery: string = Constants.Path.SERVICES_DIST_STATUS_PATH + VidConfiguration.ASDC_MODEL_STATUS;
16
17 if ( VidConfiguration.ASDC_MODEL_STATUS === Constants.Status.ALL) {
18 pathQuery = Constants.Path.SERVICES_PATH;
19 }
20
21 return this.http.get(pathQuery);
22 }
23
24 getService(uuid: string) {
25 return this.http.get(Constants.Path.SERVICES_PATH + uuid);
26 }
27
28}