<commit_before>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_PEERINGS_ENABLED');
  }
}<commit_msg>Allow deleting terminated peers<commit_after>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'].includes(this.item.State) && super.canDelete;
  }

  get canUse() {
    return this.env.var('CONSUL_PEERINGS_ENABLED');
  }
}
{'fraction_non_alphanumeric': 0.13434343434343435, 'fraction_numerical': 0.0, 'mean_word_length': 4.243386243386244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3943972', 'n_tokens_mistral': 331, 'n_tokens_neox': 323, 'n_words': 74}