github.com/outbrain/consul@v1.4.5/ui-v2/app/routes/dc/services/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/service'), 8 queryParams: { 9 s: { 10 as: 'filter', 11 replace: true, 12 }, 13 }, 14 model: function(params) { 15 const repo = get(this, 'repo'); 16 return hash({ 17 items: repo.findAllByDatacenter(this.modelFor('dc').dc.Name), 18 }); 19 }, 20 setupController: function(controller, model) { 21 this._super(...arguments); 22 controller.setProperties(model); 23 }, 24 });