github.com/aminovpavel/nomad@v0.11.8/ui/app/routes/csi/plugins/plugin/allocations.js (about) 1 import Route from '@ember/routing/route'; 2 import { collect } from '@ember/object/computed'; 3 import { watchRecord } from 'nomad-ui/utils/properties/watch'; 4 import WithWatchers from 'nomad-ui/mixins/with-watchers'; 5 6 export default Route.extend(WithWatchers, { 7 startWatchers(controller, model) { 8 if (!model) return; 9 10 controller.set('watchers', { 11 model: this.watch.perform(model), 12 }); 13 }, 14 15 resetController(controller, isExiting) { 16 if (isExiting) { 17 controller.setProperties({ 18 currentPage: 1, 19 qpType: '', 20 qpHealth: '', 21 }); 22 } 23 }, 24 25 watch: watchRecord('plugin'), 26 watchers: collect('watch'), 27 });