2019-05-01 18:09:29 +00:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { hash } from 'rsvp';
|
|
|
|
|
|
|
|
import WithRoleActions from 'consul-ui/mixins/role/with-actions';
|
|
|
|
|
|
|
|
export default Route.extend(WithRoleActions, {
|
|
|
|
repo: service('repository/role'),
|
|
|
|
queryParams: {
|
2020-07-29 14:55:38 +00:00
|
|
|
sortBy: 'sort',
|
2020-06-03 17:46:20 +00:00
|
|
|
search: {
|
2019-05-01 18:09:29 +00:00
|
|
|
as: 'filter',
|
|
|
|
replace: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
model: function(params) {
|
|
|
|
return hash({
|
2019-12-17 18:47:37 +00:00
|
|
|
...this.repo.status({
|
|
|
|
items: this.repo.findAllByDatacenter(
|
|
|
|
this.modelFor('dc').dc.Name,
|
|
|
|
this.modelFor('nspace').nspace.substr(1)
|
|
|
|
),
|
2019-05-01 18:09:29 +00:00
|
|
|
}),
|
|
|
|
isLoading: false,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
controller.setProperties(model);
|
|
|
|
},
|
|
|
|
});
|