2020-06-03 16:07:49 +00:00
|
|
|
import Service from '@ember/service';
|
2020-11-10 14:36:27 +00:00
|
|
|
import service from 'consul-ui/sort/comparators/service';
|
|
|
|
import serviceInstance from 'consul-ui/sort/comparators/service-instance';
|
2020-11-12 18:45:11 +00:00
|
|
|
import upstreamInstance from 'consul-ui/sort/comparators/upstream-instance';
|
2020-11-10 14:36:27 +00:00
|
|
|
import kv from 'consul-ui/sort/comparators/kv';
|
|
|
|
import check from 'consul-ui/sort/comparators/check';
|
|
|
|
import intention from 'consul-ui/sort/comparators/intention';
|
|
|
|
import token from 'consul-ui/sort/comparators/token';
|
|
|
|
import role from 'consul-ui/sort/comparators/role';
|
|
|
|
import policy from 'consul-ui/sort/comparators/policy';
|
|
|
|
import nspace from 'consul-ui/sort/comparators/nspace';
|
|
|
|
import node from 'consul-ui/sort/comparators/node';
|
|
|
|
|
|
|
|
const comparators = {
|
|
|
|
service: service(),
|
|
|
|
serviceInstance: serviceInstance(),
|
2020-11-12 18:45:11 +00:00
|
|
|
['upstream-instance']: upstreamInstance(),
|
2020-11-10 14:36:27 +00:00
|
|
|
kv: kv(),
|
|
|
|
check: check(),
|
|
|
|
intention: intention(),
|
|
|
|
token: token(),
|
|
|
|
role: role(),
|
|
|
|
policy: policy(),
|
|
|
|
nspace: nspace(),
|
|
|
|
node: node(),
|
|
|
|
};
|
2020-11-09 09:25:35 +00:00
|
|
|
export default class SortService extends Service {
|
2020-11-10 14:36:27 +00:00
|
|
|
comparator(type) {
|
|
|
|
return comparators[type];
|
|
|
|
}
|
2020-11-09 09:25:35 +00:00
|
|
|
}
|