Skip to content

Commit

Permalink
Merge pull request #367 from nlnwa/queueCount
Browse files Browse the repository at this point in the history
fix queue count pipe not returning correct value
  • Loading branch information
maeb authored Apr 3, 2023
2 parents b7f2c2e + 34a56b8 commit 218509a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {CrawlExecutionState, ExtraStatusCodes, JobExecutionState, JobExecutionSt
import {durationBetweenDates} from '../../../../shared/func';
import {Router} from '@angular/router';
import {JobexecutionTotalQueuePipe} from '../../pipe';
import {BehaviorSubject, Observable, Subject} from 'rxjs';
import {startWith, switchMap} from 'rxjs/operators';
import {Observable, Subject} from 'rxjs';
import {switchMap} from 'rxjs/operators';

export enum JobExecutionStatusColor {
ABORTED_MANUAL = '#924900',
Expand Down
12 changes: 10 additions & 2 deletions src/modules/report/pipe/jobexecution-total-queue.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ export class JobexecutionTotalQueuePipe implements PipeTransform {

const queryTemplate = new CrawlExecutionStatus();
queryTemplate.jobExecutionId = jobExectionStatus.id;
queryTemplate.jobId = jobExectionStatus.jobId;

const fieldMask = new FieldMask();
fieldMask.addPaths('jobExecutionId');
fieldMask.addPaths('jobId')


const returnedFields = new FieldMask();
returnedFields.addPaths('state');
returnedFields.addPaths('id');
returnedFields.addPaths('jobExecutionId');

listRequest.setQueryTemplate(CrawlExecutionStatus.toProto(queryTemplate))
listRequest.setQueryTemplate(CrawlExecutionStatus.toProto(queryTemplate));
listRequest.setQueryMask(fieldMask);
listRequest.setReturnedFieldsMask(returnedFields);
listRequest.setStateList(activeExecutionStates)
listRequest.setStateList(activeExecutionStates);

return this.reportApiService.listCrawlExecutions(listRequest).pipe(
switchMap(crawlExecutionStatus => {
Expand Down

0 comments on commit 218509a

Please sign in to comment.