Sort periodic and parameterized job detail pages by most recently submitted
This commit is contained in:
parent
9ecb25632d
commit
cb7da746b5
|
@ -19,6 +19,18 @@ export default class IndexRoute extends Route.extend(WithWatchers) {
|
|||
});
|
||||
}
|
||||
|
||||
setupController(controller, model) {
|
||||
// Parameterized and periodic detail pages, which list children jobs,
|
||||
// should sort by submit time.
|
||||
if (model && ['periodic', 'parameterized'].includes(model.templateType)) {
|
||||
controller.setProperties({
|
||||
sortProperty: 'submitTime',
|
||||
sortDescending: true,
|
||||
});
|
||||
}
|
||||
return super.setupController(...arguments);
|
||||
}
|
||||
|
||||
@watchRecord('job') watch;
|
||||
@watchAll('job') watchAll;
|
||||
@watchRecord('job-summary') watchSummary;
|
||||
|
|
Loading…
Reference in a new issue