github.com/hspak/nomad@v0.7.2-0.20180309000617-bc4ae22a39a5/ui/app/routes/jobs/job/index.js (about) 1 import Route from '@ember/routing/route'; 2 import { collect } from '@ember/object/computed'; 3 import { watchRecord, watchRelationship } 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 controller.set('watchers', { 9 model: this.get('watch').perform(model), 10 summary: this.get('watchSummary').perform(model), 11 evaluations: this.get('watchEvaluations').perform(model), 12 deployments: this.get('watchDeployments').perform(model), 13 }); 14 }, 15 16 watch: watchRecord('job'), 17 watchSummary: watchRelationship('summary'), 18 watchEvaluations: watchRelationship('evaluations'), 19 watchDeployments: watchRelationship('deployments'), 20 21 watchers: collect('watch', 'watchSummary', 'watchEvaluations', 'watchDeployments'), 22 });