2020-10-01 08:33:22 +00:00
|
|
|
import Route from 'consul-ui/routing/route';
|
2019-12-17 18:47:37 +00:00
|
|
|
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-05-29 15:42:46 +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
|
|
|
});
|
|
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
2020-10-01 08:33:22 +00:00
|
|
|
this._super(...arguments);
|
2019-12-17 18:47:37 +00:00
|
|
|
controller.setProperties(model);
|
|
|
|
},
|
|
|
|
});
|