consul/ui/packages/consul-ui/app/abilities/peer.js

21 lines
453 B
JavaScript
Raw Normal View History

import BaseAbility from 'consul-ui/abilities/base';
import { inject as service } from '@ember/service';
export default class PeerAbility extends BaseAbility {
@service('env') env;
resource = 'peering';
segmented = false;
get isLinkable() {
return this.canDelete;
}
get canDelete() {
2022-10-11 13:11:21 +00:00
return !['DELETING'].includes(this.item.State) && super.canDelete;
}
get canUse() {
return this.env.var('CONSUL_PEERINGS_ENABLED');
}
}