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-06-03 17:46:20 +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);
|
|
|
|
},
|
|
|
|
});
|