diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-07-10 15:57:37 +0300 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-07-10 15:57:37 +0300 |
commit | ff76b5ed0aa91d5fdf9dc4f95e8b20f91ed9d072 (patch) | |
tree | aae42404a93fdffdd16ff050eaa28129959f7577 /vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts | |
parent | c72d565bb58226b20625b2bce5f0019046bee649 (diff) |
New Angular UI from 1806
Change-Id: I39c160db0e0a6ec2e587ccf007ee1b23c6a08666
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
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 | 38 |
1 files changed, 38 insertions, 0 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 new file mode 100644 index 000000000..e0057bb4d --- /dev/null +++ b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts @@ -0,0 +1,38 @@ +import {Injectable} from '@angular/core'; +import {Observable} from 'rxjs/Observable'; +import {ServiceInfoModel} from './serviceInfo.model'; +import {HttpClient} from '@angular/common/http'; +import 'rxjs/add/operator/map' +import {Constants} from '../../utils/constants'; +import {forkJoin} from "rxjs/observable/forkJoin"; + +@Injectable() +export class ServiceInfoService { + constructor(private _http: HttpClient) { + } + + getServicesJobInfo(filterByUser : boolean): Observable<ServiceInfoModel[]> { + let pathQuery = Constants.Path.SERVICES_JOB_INFO_PATH; + return this._http.get<ServiceInfoModel[]>(pathQuery).map(res => res ); + } + + deleteJob(jobId: string): Observable<any> { + let pathQuery = Constants.Path.SERVICES_JOB_INFO_PATH + '/job/' + jobId; + return this._http.delete<any>(pathQuery).map(res => res); + } + + hideJob(jobId: string): Observable<any> { + let pathQuery = Constants.Path.SERVICES_JOB_INFO_PATH + '/hide/' + jobId; + return this._http.post<any>(pathQuery, null).map(res => res); + } + + getJobAuditStatus(jobId : string) : Observable<Object[]>{ + let pathQueryVID = Constants.Path.SERVICES_JOB_INFO_PATH + Constants.Path.SERVICES_JOB_AUDIT_PATH + '/' + jobId + '?source=VID'; + let pathQueryMSO = Constants.Path.SERVICES_JOB_INFO_PATH + Constants.Path.SERVICES_JOB_AUDIT_PATH + '/' + jobId + '?source=MSO'; + + let vidObs = this._http.get(pathQueryVID); + let msoObs = this._http.get(pathQueryMSO); + return forkJoin([vidObs, msoObs]); + } + +} |