2018-10-19 15:17:02 +00:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { hash } from 'rsvp';
|
|
|
|
|
|
|
|
import WithPolicyActions from 'consul-ui/mixins/policy/with-actions';
|
|
|
|
|
|
|
|
export default Route.extend(WithPolicyActions, {
|
2018-10-26 17:40:51 +00:00
|
|
|
repo: service('repository/policy'),
|
2018-10-19 15:17:02 +00:00
|
|
|
queryParams: {
|
2020-07-29 18:36:09 +00:00
|
|
|
sortBy: 'sort',
|
2020-05-29 15:42:46 +00:00
|
|
|
search: {
|
2018-10-19 15:17:02 +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)
|
|
|
|
),
|
2018-10-19 15:17:02 +00:00
|
|
|
}),
|
|
|
|
isLoading: false,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
controller.setProperties(model);
|
|
|
|
},
|
|
|
|
});
|