2020-06-03 17:07:49 +01:00
|
|
|
import service from 'consul-ui/sort/comparators/service';
|
2020-08-11 18:02:51 +01:00
|
|
|
import kv from 'consul-ui/sort/comparators/kv';
|
2020-06-16 14:13:29 +01:00
|
|
|
import check from 'consul-ui/sort/comparators/check';
|
2020-07-28 11:06:32 -04:00
|
|
|
import intention from 'consul-ui/sort/comparators/intention';
|
2020-07-29 09:41:40 -04:00
|
|
|
import token from 'consul-ui/sort/comparators/token';
|
2020-07-29 10:55:38 -04:00
|
|
|
import role from 'consul-ui/sort/comparators/role';
|
2020-07-29 14:36:09 -04:00
|
|
|
import policy from 'consul-ui/sort/comparators/policy';
|
2020-08-10 10:54:51 -04:00
|
|
|
import nspace from 'consul-ui/sort/comparators/nspace';
|
2020-06-03 17:07:49 +01: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-08-11 18:02:51 +01:00
|
|
|
kv: kv(),
|
2020-06-16 14:13:29 +01:00
|
|
|
check: check(),
|
2020-07-28 11:06:32 -04:00
|
|
|
intention: intention(),
|
2020-07-29 09:41:40 -04:00
|
|
|
token: token(),
|
2020-07-29 10:55:38 -04:00
|
|
|
role: role(),
|
2020-07-29 14:36:09 -04:00
|
|
|
policy: policy(),
|
2020-08-10 10:54:51 -04:00
|
|
|
nspace: nspace(),
|
2020-06-03 17:07:49 +01:00
|
|
|
};
|
|
|
|
Sort.reopen({
|
|
|
|
comparator: function(type) {
|
|
|
|
return comparators[type];
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
initialize,
|
|
|
|
};
|