11import { useFirewallsQuery } from '@linode/queries' ;
2- import { Button , CircleProgress , ErrorState , Hidden } from '@linode/ui' ;
2+ import {
3+ Button ,
4+ CircleProgress ,
5+ ErrorState ,
6+ Hidden ,
7+ TooltipIcon ,
8+ useTheme ,
9+ } from '@linode/ui' ;
310import { useLocation , useNavigate } from '@tanstack/react-router' ;
411import * as React from 'react' ;
512
@@ -21,6 +28,7 @@ import { usePaginationV2 } from 'src/hooks/usePaginationV2';
2128import { useSecureVMNoticesEnabled } from 'src/hooks/useSecureVMNoticesEnabled' ;
2229import { getAPIErrorOrDefault } from 'src/utilities/errorUtils' ;
2330
31+ import { useIsFirewallRulesetsPrefixlistsEnabled } from '../shared' ;
2432import { CreateFirewallDrawer } from './CreateFirewallDrawer' ;
2533import { FirewallDialog } from './FirewallDialog' ;
2634import { FirewallLandingEmptyState } from './FirewallLandingEmptyState' ;
@@ -48,6 +56,7 @@ const FirewallLanding = () => {
4856 } ,
4957 preferenceKey,
5058 } ) ;
59+ const theme = useTheme ( ) ;
5160
5261 const filter = {
5362 [ '+order' ] : order ,
@@ -66,7 +75,11 @@ const FirewallLanding = () => {
6675 const [ isModalOpen , setIsModalOpen ] = React . useState < boolean > ( false ) ;
6776 const [ dialogMode , setDialogMode ] = React . useState < Mode > ( 'enable' ) ;
6877 const [ isGenerateDialogOpen , setIsGenerateDialogOpen ] = React . useState ( false ) ;
78+ const { isFirewallRulesetsPrefixlistsEnabled } =
79+ useIsFirewallRulesetsPrefixlistsEnabled ( ) ;
6980
81+ const rulesColumnTooltipText =
82+ 'Includes both rules and Rule Sets in the count. Each Rule Set is counted as one rule, regardless of how many rules it contains.' ;
7083 const flags = useFlags ( ) ;
7184 const { secureVMNoticesEnabled } = useSecureVMNoticesEnabled ( ) ;
7285
@@ -193,7 +206,18 @@ const FirewallLanding = () => {
193206 Status
194207 </ TableSortCell >
195208 < Hidden smDown >
196- < TableCell sx = { { width : '15%' } } > Rules</ TableCell >
209+ < TableCell sx = { { width : '15%' } } >
210+ Rules
211+ { isFirewallRulesetsPrefixlistsEnabled && (
212+ < TooltipIcon
213+ status = "info"
214+ sxTooltipIcon = { {
215+ padding : `0 ${ theme . spacingFunction ( 8 ) } ${ theme . spacingFunction ( 2 ) } ${ theme . spacingFunction ( 8 ) } ` ,
216+ } }
217+ text = { rulesColumnTooltipText }
218+ />
219+ ) }
220+ </ TableCell >
197221 < TableCell sx = { { width : '45%' } } > Services</ TableCell >
198222 </ Hidden >
199223 < TableCell sx = { { width : '10%' } } />
0 commit comments