open-consul/ui/packages/consul-ui/app/routes/dc/services/instance/healthchecks.js
John Cowen 23adad684b
ui: HealthCheck Search/Sort/Filtering (#9314)
* Adds model layer changes around HealthChecks

1. Makes a HealthCheck model fragment and uses it in ServiceInstances and
Nodes
2. Manually adds a relationship between a ServiceInstance and its
potential ServiceInstanceProxy
3. Misc changes related to the above such as an Exposed property on
MeshChecks, MeshChecks itself

* Add a potential temporary endpoint to distinguish ProxyServiceInstance

* Fix up Node search bar class

* Add search/sort/filter logic

* Fixup Service default sort key

* Add Healthcheck search/sort/filtering

* Tweak CSS add a default Type of 'Serf' when type is blank

* Fix up tests and new test support

* Add ability to search on Service/Node name depending on where you are

* Fixup CheckID search predicate

* Use computed for DataCollection to use caching

* Alpha sort the Type menu

* Temporary fix for new non-changing style Ember Proxys

* Only special case EventSource proxies
2020-12-07 09:14:30 +00:00

35 lines
750 B
JavaScript

import Route from 'consul-ui/routing/route';
export default class HealthchecksRoute extends Route {
queryParams = {
sortBy: 'sort',
status: 'status',
kind: 'kind',
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);
}
}