mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 05:45:46 +00:00
7949410208
* 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
19 lines
421 B
JavaScript
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,
|
|
};
|