open-nomad/ui/app/routes/nodes/node.js
2017-10-05 14:39:37 -07:00

20 lines
449 B
JavaScript

import Ember from 'ember';
import notifyError from 'nomad-ui/utils/notify-error';
const { Route, inject } = Ember;
export default Route.extend({
store: inject.service(),
model() {
return this._super(...arguments).catch(notifyError(this));
},
afterModel(model) {
if (model && model.get('isPartial')) {
return model.reload().then(node => node.get('allocations'));
}
return model && model.get('allocations');
},
});