-
Notifications
You must be signed in to change notification settings - Fork 115
feat(ips): add port range support #21504
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: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds port range support to the Edge Network Firewall configuration, allowing users to specify port ranges (e.g., "80-90") in addition to single ports. The PR also removes the forced mitigation check for configuring the Edge Network Firewall and includes minor code quality improvements.
- Adds UI support for entering port ranges with validation and helper tooltips
- Implements logic to format port ranges into API-compatible formats (lt, gt, range)
- Updates API types to accept both single ports and port ranges
- Removes the forced mitigation prerequisite for Edge Network Firewall configuration
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| PortColumn.component.tsx | Adds port range input validation, tooltip component, and updates input handling to accept hyphens |
| useCreateIpEdgeFirewallRule.ts | Implements port range validation and formatting logic (formatPortValue, formatPortRangeValue) |
| useCreateIpEdgeFirewallRule.helpers.spec.ts | Adds comprehensive tests for port range validation and formatting functions |
| ipEdgeFirewall.ts | Updates API signature to support sourcePortRange and destinationPortRange parameters |
| IpActionsCell.tsx | Removes forced mitigation check and related hook usage |
| IpActionsCell.spec.tsx | Removes test case for forced mitigation scenario |
| Messages_fr_FR.json | Updates column labels and adds tooltip text for port range format |
| SourceColumn.component.tsx | Adds flex class for consistent layout |
| SequenceColumn.component.tsx | Adds flex class for consistent layout |
| ProtocolColumn.component.tsx | Adds flex class for consistent layout |
| ModeColumn.component.tsx | Adds flex class for consistent layout |
| IpGameFirewallDisplay.tsx | Minor code quality improvements (removes void keyword, uses !length instead of === 0) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../manager/apps/ips/src/pages/configureEdgeNetworkFirewall/components/PortColumn.component.tsx
Outdated
Show resolved
Hide resolved
packages/manager/apps/ips/src/data/hooks/ip/edge-firewall/useCreateIpEdgeFirewallRule.ts
Outdated
Show resolved
Hide resolved
...manager/apps/ips/src/data/hooks/ip/edge-firewall/useCreateIpEdgeFirewallRule.helpers.spec.ts
Outdated
Show resolved
Hide resolved
.../manager/apps/ips/src/pages/configureEdgeNetworkFirewall/components/PortColumn.component.tsx
Show resolved
Hide resolved
packages/manager/apps/ips/src/data/hooks/ip/edge-firewall/useCreateIpEdgeFirewallRule.ts
Outdated
Show resolved
Hide resolved
f3097c7 to
ac4794c
Compare
ref: #MANAGER-20168 Signed-off-by: Nicolas Pierre-charles <nicolas.pierre-charles.ext@corp.ovh.com>
ac4794c to
d199818
Compare
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
ref: #MANAGER-20168
Description
Ticket Reference: #...
Additional Information