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