diff options
Diffstat (limited to 'client/src/app/+admin/jobs/shared/job.service.ts')
-rw-r--r-- | client/src/app/+admin/jobs/shared/job.service.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/+admin/jobs/shared/job.service.ts b/client/src/app/+admin/jobs/shared/job.service.ts index 6441eaac1..b96dc3359 100644 --- a/client/src/app/+admin/jobs/shared/job.service.ts +++ b/client/src/app/+admin/jobs/shared/job.service.ts | |||
@@ -25,8 +25,11 @@ export class JobService { | |||
25 | 25 | ||
26 | return this.authHttp.get<ResultList<Job>>(JobService.BASE_JOB_URL + '/' + state, { params }) | 26 | return this.authHttp.get<ResultList<Job>>(JobService.BASE_JOB_URL + '/' + state, { params }) |
27 | .pipe( | 27 | .pipe( |
28 | map(res => this.restExtractor.convertResultListDateToHuman(res, [ 'createdAt', 'updatedAt' ])), | 28 | map(res => { |
29 | return this.restExtractor.convertResultListDateToHuman(res, [ 'createdAt', 'processedOn', 'finishedOn' ]) | ||
30 | }), | ||
29 | map(res => this.restExtractor.applyToResultListData(res, this.prettyPrintData)), | 31 | map(res => this.restExtractor.applyToResultListData(res, this.prettyPrintData)), |
32 | map(res => this.restExtractor.applyToResultListData(res, this.buildUniqId)), | ||
30 | catchError(err => this.restExtractor.handleError(err)) | 33 | catchError(err => this.restExtractor.handleError(err)) |
31 | ) | 34 | ) |
32 | } | 35 | } |
@@ -36,4 +39,8 @@ export class JobService { | |||
36 | 39 | ||
37 | return Object.assign(obj, { data }) | 40 | return Object.assign(obj, { data }) |
38 | } | 41 | } |
42 | |||
43 | private buildUniqId (obj: Job) { | ||
44 | return Object.assign(obj, { uniqId: `${obj.id}-${obj.type}` }) | ||
45 | } | ||
39 | } | 46 | } |