mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 23:05:28 +00:00
6fa68a5b57
* ui: Remove UNDEFINED state from being undeleteable * Fixup node tests
24 lines
484 B
JavaScript
24 lines
484 B
JavaScript
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() {
|
|
return ![
|
|
'DELETING',
|
|
'TERMINATED'
|
|
].includes(this.item.State) && super.canDelete;
|
|
}
|
|
|
|
get canUse() {
|
|
return this.env.var('CONSUL_PEERING_ENABLED');
|
|
}
|
|
}
|