ui: Remove UNDEFINED state from being undeleteable (#13702)

* ui: Remove UNDEFINED state from being undeleteable

* Fixup node tests
This commit is contained in:
John Cowen 2022-07-13 12:06:16 +01:00 committed by GitHub
parent 6b67b74a19
commit 6fa68a5b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -11,8 +11,10 @@ export default class PeerAbility extends BaseAbility {
return this.canDelete;
}
get canDelete() {
// TODO: Need to confirm these states
return !['DELETING', 'TERMINATED', 'UNDEFINED'].includes(this.item.State) && super.canDelete;
return ![
'DELETING',
'TERMINATED'
].includes(this.item.State) && super.canDelete;
}
get canUse() {

View File

@ -20,6 +20,7 @@ test(
ACLsEnabled: true,
NamespacesEnabled: false,
SSOEnabled: false,
PeeringEnabled: true,
PartitionsEnabled: false,
LocalDatacenter: 'dc1',
PrimaryDatacenter: 'dc1',
@ -35,6 +36,7 @@ test(
ACLsEnabled: true,
NamespacesEnabled: true,
SSOEnabled: false,
PeeringEnabled: true,
PartitionsEnabled: false,
LocalDatacenter: 'dc1',
PrimaryDatacenter: 'dc1',
@ -50,6 +52,7 @@ test(
ACLsEnabled: true,
NamespacesEnabled: false,
SSOEnabled: true,
PeeringEnabled: true,
PartitionsEnabled: false,
LocalDatacenter: 'dc1',
PrimaryDatacenter: 'dc1',