Skip to content

Commit 81e2a18

Browse files
upcoming:[UIE-9509] - Add tooltip for Rules column header in Firewall Rules table (#13090)
* upcoming:[UIE-9509] - Add tooltip for Rules column in Firewall Rules table * Added changeset: Add tooltip for Rules column header in Firewall Rules table
1 parent 0888fb0 commit 81e2a18

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Upcoming Features
3+
---
4+
5+
Add tooltip for Rules column header in Firewall Rules table ([#13090](https://github.com/linode/manager/pull/13090))

packages/manager/src/features/Firewalls/FirewallLanding/FirewallLanding.tsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { 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';
310
import { useLocation, useNavigate } from '@tanstack/react-router';
411
import * as React from 'react';
512

@@ -21,6 +28,7 @@ import { usePaginationV2 } from 'src/hooks/usePaginationV2';
2128
import { useSecureVMNoticesEnabled } from 'src/hooks/useSecureVMNoticesEnabled';
2229
import { getAPIErrorOrDefault } from 'src/utilities/errorUtils';
2330

31+
import { useIsFirewallRulesetsPrefixlistsEnabled } from '../shared';
2432
import { CreateFirewallDrawer } from './CreateFirewallDrawer';
2533
import { FirewallDialog } from './FirewallDialog';
2634
import { 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

Comments
 (0)