open-nomad/ui/app/routes/servers.js
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

20 lines
366 B
JavaScript

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'),
});
},
});