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/abilities/peer.js

22 lines
503 B

import BaseAbility from 'consul-ui/abilities/base';
import { inject as service } from '@ember/service';
export default class PeerAbility extends BaseAbility {
@service('env') env;
resource = 'operator';
segmented = false;
get isLinkable() {
return this.canDelete;
}
get canDelete() {
// TODO: Need to confirm these states
return !['DELETING', 'TERMINATED', 'UNDEFINED'].includes(this.item.State);
}
get canUse() {
return this.env.var('CONSUL_PEERING_ENABLED');
}
}