2019-12-17 18:47:37 +00:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { hash } from 'rsvp';
|
|
|
|
|
|
|
|
import WithNspaceActions from 'consul-ui/mixins/nspace/with-actions';
|
|
|
|
export default Route.extend(WithNspaceActions, {
|
2020-07-17 13:42:45 +00:00
|
|
|
data: service('data-source/service'),
|
2019-12-17 18:47:37 +00:00
|
|
|
repo: service('repository/nspace'),
|
|
|
|
queryParams: {
|
2020-08-10 14:54:51 +00:00
|
|
|
sortBy: 'sort',
|
2020-06-03 17:46:20 +00:00
|
|
|
search: {
|
2019-12-17 18:47:37 +00:00
|
|
|
as: 'filter',
|
|
|
|
replace: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
model: function(params) {
|
|
|
|
return hash({
|
2020-07-17 13:42:45 +00:00
|
|
|
items: this.data.source(uri => uri`/*/*/namespaces`),
|
2019-12-17 18:47:37 +00:00
|
|
|
isLoading: false,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
|
|
controller.setProperties(model);
|
|
|
|
},
|
|
|
|
});
|