github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/routes/clients/client.js (about) 1 import { inject as service } from '@ember/service'; 2 import Route from '@ember/routing/route'; 3 import notifyError from 'nomad-ui/utils/notify-error'; 4 5 export default class ClientRoute extends Route { 6 @service store; 7 8 model() { 9 return super.model(...arguments).catch(notifyError(this)); 10 } 11 12 afterModel(model) { 13 if (model && model.get('isPartial')) { 14 return model.reload().then((node) => node.get('allocations')); 15 } 16 return model && model.get('allocations'); 17 } 18 }