open-nomad/ui/app/routes/clients/index.js
Michael Lange e54cf51460 Move node watching to the index page
It doesn't need to impact the entire route hierarchy
2018-03-05 09:32:04 -08:00

17 lines
389 B
JavaScript

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