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