2020-06-03 16:07:49 +00:00
|
|
|
import service from 'consul-ui/sort/comparators/service';
|
2020-06-16 13:13:29 +00:00
|
|
|
import check from 'consul-ui/sort/comparators/check';
|
2020-06-03 16:07:49 +00:00
|
|
|
|
|
|
|
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(),
|
2020-06-16 13:13:29 +00:00
|
|
|
check: check(),
|
2020-06-03 16:07:49 +00:00
|
|
|
};
|
|
|
|
Sort.reopen({
|
|
|
|
comparator: function(type) {
|
|
|
|
return comparators[type];
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
initialize,
|
|
|
|
};
|