github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/routes/clients/client.js (about)

     1  import Ember from 'ember';
     2  import notifyError from 'nomad-ui/utils/notify-error';
     3  
     4  const { Route, inject } = Ember;
     5  
     6  export default Route.extend({
     7    store: inject.service(),
     8  
     9    model() {
    10      return this._super(...arguments).catch(notifyError(this));
    11    },
    12  
    13    afterModel(model) {
    14      if (model && model.get('isPartial')) {
    15        return model.reload().then(node => node.get('allocations'));
    16      }
    17      return model && model.get('allocations');
    18    },
    19  });