Skip to content

upcoming: [M3-9829] - Refactor AddLinodeDrawer and add support for assigning multiple firewalls #12220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-12220-added-1747258248456.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Added
---

Support for assigning multiple firewalls to entities ([#12220](https://github.com/linode/manager/pull/12220))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Refactor AddLinodeDrawer to remove useEffect when filtering interface devices ([#12220](https://github.com/linode/manager/pull/12220))
29 changes: 19 additions & 10 deletions packages/manager/src/factories/firewalls.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import {
type Firewall,
type FirewallDevice,
type FirewallDeviceEntityType,
type FirewallRules,
type FirewallRuleType,
type FirewallSettings,
type FirewallTemplate,
type FirewallTemplateRules,
} from '@linode/api-v4/lib/firewalls/types';
import { Factory } from '@linode/utilities';

import type {
Firewall,
FirewallDevice,
FirewallDeviceEntityType,
FirewallRules,
FirewallRuleType,
FirewallSettings,
FirewallTemplate,
FirewallTemplateRules,
} from '@linode/api-v4/lib/firewalls/types';
import type { FirewallDeviceEntity } from '@linode/api-v4/lib/firewalls/types';

export const firewallRuleFactory = Factory.Sync.makeFactory<FirewallRuleType>({
action: 'DROP',
Expand Down Expand Up @@ -58,6 +59,14 @@ export const firewallFactory = Factory.Sync.makeFactory<Firewall>({
updated: '2020-01-01 00:00:00',
});

export const firewallEntityfactory =
Factory.Sync.makeFactory<FirewallDeviceEntity>({
id: 1,
label: 'my-linode',
type: 'linode' as FirewallDeviceEntityType,
url: '/test',
});

export const firewallDeviceFactory = Factory.Sync.makeFactory<FirewallDevice>({
created: '2020-01-01',
entity: {
Expand Down
Loading