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