Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Disable query to get Linode's firewalls for Linodes using new interfaces in LinodeEntityDetail ([#11796](https://github.com/linode/manager/pull/11796))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Fix typo in copy for Firewall Create VPC template ([#11796](https://github.com/linode/manager/pull/11796))
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const VPCTemplateRules = () => {
<>
<Typography sx={(theme) => ({ marginTop: theme.spacing(3) })}>
Allows for login with SSH, regular networking control data, and inbound
traffice from the VPC address space.
traffic from the VPC address space.
</Typography>
<Typography sx={(theme) => ({ marginTop: theme.spacing(2) })}>
{STRENGTHEN_TEMPLATE_RULES}
Expand Down
5 changes: 4 additions & 1 deletion packages/manager/src/features/Linodes/LinodeEntityDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ export const LinodeEntityDetail = (props: Props) => {
vpcLinodeIsAssignedTo,
} = useVPCConfigInterface(linode.id);

const { data: attachedFirewallData } = useLinodeFirewallsQuery(linode.id);
const { data: attachedFirewallData } = useLinodeFirewallsQuery(
linode.id,
linode.interface_generation !== 'linode'
);

const attachedFirewalls = attachedFirewallData?.data ?? [];

Expand Down
12 changes: 8 additions & 4 deletions packages/manager/src/queries/linodes/firewalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import { linodeQueries } from './linodes';

import type { APIError, Firewall, ResourcePage } from '@linode/api-v4';

export const useLinodeFirewallsQuery = (linodeId: number) =>
useQuery<ResourcePage<Firewall>, APIError[]>(
linodeQueries.linode(linodeId)._ctx.firewalls
);
export const useLinodeFirewallsQuery = (
linodeId: number,
enabled: boolean = true
) =>
useQuery<ResourcePage<Firewall>, APIError[]>({
...linodeQueries.linode(linodeId)._ctx.firewalls,
enabled,
});