mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
Sort periodic and parameterized job detail pages by most recently submitted
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user