github.com/manicqin/nomad@v0.9.5/ui/app/routes/allocations/allocation/index.js (about) 1 import Route from '@ember/routing/route'; 2 3 export default Route.extend({ 4 setupController(controller, model) { 5 // Suppress the preemptedByAllocation fetch error in the event it's a 404 6 if (model) { 7 const setPreempter = () => controller.set('preempter', model.preemptedByAllocation); 8 model.preemptedByAllocation.then(setPreempter, setPreempter); 9 } 10 11 return this._super(...arguments); 12 }, 13 14 resetController(controller, isExiting) { 15 if (isExiting) { 16 controller.watchNext.cancelAll(); 17 } 18 }, 19 });