Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(3200): incorporating selection to render number of historical builds in jobs list view #1291

Merged
merged 8 commits into from
Dec 12, 2024
8 changes: 7 additions & 1 deletion app/components/pipeline/jobs/table/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 5 additions & 1 deletion app/components/pipeline/jobs/table/dataReloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down