John Cowen 2c3b6aec05
ui: Remove old style 'filterable' searching (#9356)
* Switch upstream-instances to use new style of searchable

* Add search action to DataCollection plus basic README

* Use DataCollection for PowerSelect searching in child-selectors

* Remove old style filterable search for role/policies and instances

* Remove old helpers/components related to search/sort/filter
2020-12-09 19:12:17 +00:00

32 lines
682 B
JavaScript

import Route from 'consul-ui/routing/route';
export default class UpstreamsRoute extends Route {
queryParams = {
sortBy: 'sort',
search: {
as: 'filter',
replace: true,
},
searchproperty: {
as: 'searchproperty',
empty: [['DestinationName', 'LocalBindAddress', 'LocalBindPort']],
},
};
model() {
const parent = this.routeName
.split('.')
.slice(0, -1)
.join('.');
return {
...this.modelFor(parent),
searchProperties: this.queryParams.searchproperty.empty[0],
};
}
setupController(controller, model) {
super.setupController(...arguments);
controller.setProperties(model);
}
}