open-nomad/ui/app/routes/jobs/index.js
Michael Lange a79c0aa853 Move jobs polling from jobs to jobs.index
It's only necessary for the list view, not the entire route hierarchy
2018-03-05 09:32:04 -08:00

23 lines
457 B
JavaScript

import Route from '@ember/routing/route';
import { watchAll } from 'nomad-ui/utils/properties/watch';
export default Route.extend({
setupController(controller) {
controller.set('modelWatch', this.get('watch').perform());
return this._super(...arguments);
},
deactivate() {
this.get('watch').cancelAll();
this._super(...arguments);
},
watch: watchAll('job'),
actions: {
refreshRoute() {
return true;
},
},
});