github.com/outbrain/consul@v1.4.5/ui-v2/app/routes/dc/nodes/index.js (about) 1 import Route from '@ember/routing/route'; 2 import { inject as service } from '@ember/service'; 3 import { hash } from 'rsvp'; 4 import { get } from '@ember/object'; 5 6 export default Route.extend({ 7 repo: service('repository/node'), 8 queryParams: { 9 s: { 10 as: 'filter', 11 replace: true, 12 }, 13 }, 14 model: function(params) { 15 return hash({ 16 items: get(this, 'repo').findAllByDatacenter(this.modelFor('dc').dc.Name), 17 }); 18 }, 19 setupController: function(controller, model) { 20 this._super(...arguments); 21 controller.setProperties(model); 22 }, 23 });