-
Notifications
You must be signed in to change notification settings - Fork 379
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
base: develop
Are you sure you want to change the base?
Conversation
if (linodesNeedingInterfaceSelection.length > 0) { | ||
interfaceError = | ||
'You must select an interface to assign to this Firewall.'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the one visual/functionality difference for adding interfaces that (should - unless there are bugs 🤞) exists between this version and the old is that now, if we select a LInode but don't select a corresponding interface, we receive an error (instead of submit button being disabled):
Before | After |
---|---|
![]() |
![]() |
this aligns behavior with other drawers/forms in CM a bit more (submitting + receiving error back), but I can look into changing back to disabling the button if wanted!
const linodesNeedingInterfaceSelection = | ||
selectedLinodesWithMultipleInterfaces.filter( | ||
(linode) => !selectedIfacesToAdd[linode.id] | ||
); | ||
const failedLinodes: Linode[] = [...linodesNeedingInterfaceSelection]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we've selected a Linode with multiple eligible interfaces, haven't selected an interface for that Linode, and click add, no interface device gets added for those Linodes. So, we will save them for the next attempt and display a message to select the interfaces
<ShowMore | ||
ariaItemType="Interface Firewalls" | ||
items={firewalls} | ||
render={(firewalls) => ( | ||
<Stack> | ||
{firewalls.map((firewall) => ( | ||
<Link key={firewall.id} to={`/firewalls/${firewall.id}`}> | ||
{firewall.label} | ||
</Link> | ||
))} | ||
</Stack> | ||
)} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
considering adding this to LinodeEntityDetail as well (see #12176), but I feel like it makes the UI a bit too cluttered:
vs
Cloud Manager UI test results🔺 1 failing test on test run #9 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/objectStorageMulticluster/object-storage-objects-multicluster.spec.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality seems to be working as expected
return firewall?.status !== 'enabled' | ||
? !isEntityAssignedToFirewall | ||
: !isEntityAssignedToFirewall && | ||
!firewallEntities?.some( | ||
(service) => | ||
service.id === entityId && service.firewallStatus === 'enabled' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use some early returns instead of teranaries to make this cleaner and more readable
Description 📝
FOLLOW UP: M3-9984 to continue supporting multiple firewall functionality
RELATED: M3-9884
Changes 🔄
Preview 📷
there should be no visual changes (besides comment below)
Functionality changes - see video
cannot-multi-assign.mov
can-multi-assign.mov
How to test 🧪
To test Linode Interface stuff, you'll need the tag + feature flag
Verification steps
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅