John Cowen 7949410208 ui: Add ability to sort service based on health (#7989)
* ui: Add ability to sort service based on health

* ui: Move custom sorting to sort/comparator Service/Helper (like search)

This moves custom sorting to use the same pattern as custom searching.

* Remove old Controller based comparator
2020-06-03 16:46:57 +00:00

19 lines
421 B
JavaScript

import service from 'consul-ui/sort/comparators/service';
export function initialize(container) {
// Service-less injection using private properties at a per-project level
const Sort = container.resolveRegistration('service:sort');
const comparators = {
service: service(),
};
Sort.reopen({
comparator: function(type) {
return comparators[type];
},
});
}
export default {
initialize,
};