diff --git a/app/components/pipeline/jobs/table/component.js b/app/components/pipeline/jobs/table/component.js index a05a25886..25ed24e7f 100644 --- a/app/components/pipeline/jobs/table/component.js +++ b/app/components/pipeline/jobs/table/component.js @@ -26,8 +26,14 @@ export default class PipelineJobsTableComponent extends Component { }, { title: 'HISTORY', + propertyName: 'history', className: 'history-column', - component: 'historyCell' + component: 'historyCell', + filterFunction: async (_, filterVal) => { + await this.dataReloader.setNumBuilds(filterVal); + }, + filterWithSelect: true, + predefinedFilterOptions: ['5', '10', '15', '20', '25', '30'] }, { title: 'DURATION', diff --git a/app/components/pipeline/jobs/table/dataReloader.js b/app/components/pipeline/jobs/table/dataReloader.js index 863846293..33edc59dc 100644 --- a/app/components/pipeline/jobs/table/dataReloader.js +++ b/app/components/pipeline/jobs/table/dataReloader.js @@ -97,8 +97,12 @@ export default class DataReloader { }); } - setNumBuilds(numBuilds) { + async setNumBuilds(numBuilds) { + if (this.numBuilds === numBuilds) { + return; + } this.numBuilds = numBuilds; + await this.fetchBuildsForJobs(this.jobIdsMatchingFilter); } start() {