You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/app/services/sort.js

30 lines
945 B

import Service from '@ember/service';
import service from 'consul-ui/sort/comparators/service';
import serviceInstance from 'consul-ui/sort/comparators/service-instance';
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(),
kv: kv(),
check: check(),
intention: intention(),
token: token(),
role: role(),
policy: policy(),
nspace: nspace(),
node: node(),
};
export default class SortService extends Service {
comparator(type) {
return comparators[type];
}
}