mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Handle 404s on nodes
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
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.get('isPartial')) {
|
||||
if (model && model.get('isPartial')) {
|
||||
return model.reload().then(node => node.get('allocations'));
|
||||
}
|
||||
return model.get('allocations');
|
||||
return model && model.get('allocations');
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user