open-nomad/ui/app/routes/servers.js

20 lines
366 B
JavaScript
Raw Normal View History

2017-09-19 14:47:10 +00:00
import Ember from 'ember';
const { Route, inject, RSVP } = Ember;
export default Route.extend({
store: inject.service(),
system: inject.service(),
beforeModel() {
return this.get('system.leader');
},
model() {
return RSVP.hash({
nodes: this.get('store').findAll('node'),
agents: this.get('store').findAll('agent'),
});
},
});