1
- import { useRegionsQuery } from '@linode/queries' ;
2
1
import { CircleProgress , ErrorState } from '@linode/ui' ;
3
- import { doesRegionSupportFeature } from '@linode/utilities' ;
4
2
import Grid from '@mui/material/Grid2' ;
5
3
import * as React from 'react' ;
6
- import { useFlags } from 'src/hooks/useFlags' ;
7
4
8
5
import { useIsAcceleratedPlansEnabled } from 'src/features/components/PlansPanel/utils' ;
9
6
import { extendType } from 'src/utilities/extendType' ;
10
7
11
8
import {
12
9
ADD_NODE_POOLS_DESCRIPTION ,
13
- ADD_NODE_POOLS_ENCRYPTION_DESCRIPTION ,
14
10
ADD_NODE_POOLS_ENTERPRISE_DESCRIPTION ,
15
- ADD_NODE_POOLS_NO_ENCRYPTION_DESCRIPTION ,
16
11
} from '../ClusterList/constants' ;
17
12
import { KubernetesPlansPanel } from '../KubernetesPlansPanel/KubernetesPlansPanel' ;
18
13
@@ -73,12 +68,8 @@ const Panel = (props: NodePoolPanelProps) => {
73
68
types,
74
69
} = props ;
75
70
76
- const flags = useFlags ( ) ;
77
-
78
71
const { isAcceleratedLKEPlansEnabled } = useIsAcceleratedPlansEnabled ( ) ;
79
72
80
- const regions = useRegionsQuery ( ) . data ?? [ ] ;
81
-
82
73
const [ typeCountMap , setTypeCountMap ] = React . useState < Map < string , number > > (
83
74
new Map ( )
84
75
) ;
@@ -99,27 +90,9 @@ const Panel = (props: NodePoolPanelProps) => {
99
90
setSelectedType ( planId ) ;
100
91
} ;
101
92
102
- // "Disk Encryption" indicates general availability and "LA Disk Encryption" indicates limited availability
103
- const regionSupportsDiskEncryption =
104
- doesRegionSupportFeature (
105
- selectedRegionId ?? '' ,
106
- regions ,
107
- 'Disk Encryption'
108
- ) ||
109
- doesRegionSupportFeature (
110
- selectedRegionId ?? '' ,
111
- regions ,
112
- 'LA Disk Encryption'
113
- ) ;
114
-
115
93
const getPlansPanelCopy = ( ) => {
116
- // TODO - LKE-E: Remove the 'ADD_NODE_POOLS_NO_ENCRYPTION_DESCRIPTION' copy once LDE is enabled on LKE-E.
117
- if ( selectedTier === 'enterprise' ) {
118
- return `${ ADD_NODE_POOLS_ENTERPRISE_DESCRIPTION } ${ ADD_NODE_POOLS_NO_ENCRYPTION_DESCRIPTION } ` ;
119
- }
120
- // @TODO LDE: once LDE has been fully rolled out and is in GA in all regions, remove the feature flag condition
121
- return regionSupportsDiskEncryption && flags . linodeDiskEncryption
122
- ? `${ ADD_NODE_POOLS_DESCRIPTION } ${ ADD_NODE_POOLS_ENCRYPTION_DESCRIPTION } `
94
+ return selectedTier === 'enterprise'
95
+ ? ADD_NODE_POOLS_ENTERPRISE_DESCRIPTION
123
96
: ADD_NODE_POOLS_DESCRIPTION ;
124
97
} ;
125
98
0 commit comments