import Route from 'consul-ui/routing/route'; import { inject as service } from '@ember/service'; import { hash } from 'rsvp'; export default Route.extend({ data: service('data-source/service'), queryParams: { sortBy: 'sort', search: { as: 'filter', replace: true, }, }, model: function(params) { const dc = this.modelFor('dc').dc.Name; const nspace = '*'; return hash({ items: this.data.source(uri => uri`/${nspace}/${dc}/nodes`), leader: this.data.source(uri => uri`/${nspace}/${dc}/leader`), }); }, setupController: function(controller, model) { this._super(...arguments); controller.setProperties(model); }, });