mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 03:29:43 +00:00
bb95738321
Adds a 'status' for the filtering/searching in the UI, without this its not super clear that you are filtering a recordset due to the menu selections being hidden once closed. You can also use the pills in this status view to delete individual filters.
34 lines
732 B
JavaScript
34 lines
732 B
JavaScript
import Route from 'consul-ui/routing/route';
|
|
|
|
export default class HealthchecksRoute extends Route {
|
|
queryParams = {
|
|
sortBy: 'sort',
|
|
status: 'status',
|
|
check: 'check',
|
|
searchproperty: {
|
|
as: 'searchproperty',
|
|
empty: [['Name', 'Node', 'CheckID', 'Notes', 'Output', 'ServiceTags']],
|
|
},
|
|
search: {
|
|
as: 'filter',
|
|
replace: true,
|
|
},
|
|
};
|
|
|
|
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);
|
|
}
|
|
}
|