diff options
author | Eylon Malin <eylon.malin@intl.att.com> | 2019-12-02 10:55:37 +0200 |
---|---|---|
committer | Eylon Malin <eylon.malin@intl.att.com> | 2019-12-02 08:58:26 +0000 |
commit | d0a3e90aa0c515dfa94cf648d339db58e285b4cb (patch) | |
tree | d4af22062898f8a41d86ed052c7fce5de14410ab /vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts | |
parent | e8887222c45e7d1849cb8098997c8fb7c149ebd7 (diff) |
FE getServicesJobInfo can filter by serviceModelId
Issue-ID: VID-724
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Change-Id: I3acff0f47810825d90b91dbeaaedcdd348c7d733
Diffstat (limited to 'vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts index fe6ebc7ee..388afdba0 100644 --- a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts +++ b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts @@ -2,8 +2,6 @@ import {Injectable} from '@angular/core'; import {Observable} from 'rxjs'; import {ServiceInfoModel} from './serviceInfo.model'; import {HttpClient, HttpHeaders} from '@angular/common/http'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; import {Constants} from '../../utils/constants'; import {forkJoin} from "rxjs/observable/forkJoin"; import * as _ from 'lodash'; @@ -14,10 +12,11 @@ export class ServiceInfoService { constructor(private _http: HttpClient) { } - getServicesJobInfo(filterByUser : boolean, showSpinner: boolean = true): Observable<ServiceInfoModel[]> { + getServicesJobInfo(showSpinner: boolean = true, serviceModelId: string = null): Observable<ServiceInfoModel[]> { let pathQuery = Constants.Path.SERVICES_JOB_INFO_PATH; let headers = new HttpHeaders({'x-show-spinner': showSpinner.toString()}); - return this._http.get<ServiceInfoModel[]>(pathQuery, { headers: headers }).map(res => res ); + let params = serviceModelId ? {serviceModelId} : {}; + return this._http.get<ServiceInfoModel[]>(pathQuery, { headers: headers, params }); } deleteJob(jobId: string): Observable<any> { |