upcoming: [DI-26678] - Alert Firewall dimension filters customization - #12789
upcoming: [DI-26678] - Alert Firewall dimension filters customization#12789santoshp210-akamai wants to merge 18 commits into
Conversation
|
Few changes from Around 250+ lines of code changes are for mock testing, utils and tests. |
|
I have pushed the fix |
| threshold: 1000, | ||
| dimension_filters: [ | ||
| { | ||
| label: 'VPC-Subnet', |
There was a problem hiding this comment.
| label: 'VPC-Subnet', | |
| label: 'VPC Subnet', |
I think we should remove any instances where the dash appears as we don't use "VPC-Subnet" anywhere else in the application
There was a problem hiding this comment.
I am using the same labels that we currently receive from the firewall/metric-definitions API call for mocks as well.
| export const getResolvedDimensionValue = ( | ||
| dimensionFilterKey: string, | ||
| dimensionOperator: DimensionFilterOperatorType, | ||
| value: null | string | undefined, | ||
| serviceType: CloudPulseServiceType, | ||
| linodeMap: Record<string, string>, | ||
| vpcSubnetMap: Record<string, string>, | ||
| transformationAllowedOperators: DimensionFilterOperatorType[] | ||
| ): string => { |
There was a problem hiding this comment.
With this many parameters, it would be better to have the function accept an object. It will also help prevent the wrong thing from being passed in the wrong slot (which could happen with, for example, linodeMap and vpcSubnetMap in the current implementation).
There was a problem hiding this comment.
@dwiley-akamai , All of the logic initially was in the RenderAlertsMetricsAndDimensions component directly. Created this separated util to handle logic and keep the component clean and simple.
As of now there are no requirements that will require us to make further use of this component. But if we have to, we will consider this feedback and create a Interface for them in the upcoming PRs.
There was a problem hiding this comment.
@coliu-akamai ,Sure will make it a prop interface and push the change.
coliu-akamai
left a comment
There was a problem hiding this comment.
question with Linode Region dimension filter - should we consider using a region select for cases when the filter is equal, not equal, or in?
Seeing this error appear some times - I haven't been able to get clear replicating steps, but it once appeared when I changed the Operator type and then backspaced in the Value field

|
@santoshp210-akamai there are some conflicts due to recent merge, they need to be resolved. I also see serverhandler changes being pushed, please remove them. |
|
@coliu-akamai , For the Linode Region filter we want to provide the functionality of choosing the options currently. We are not sure to make it a RegionFilter as of now and it wasn't in the scope of this particular ticket. If we plan it , it will be part of a future PR. |
Cloud Manager UI test results🔺 1 failing test on test run #13 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/helpAndSupport/open-support-ticket.spec.ts" |
|||||||||||||||||
|
Pushed this commit 0e51a78 which has the following changes //Previous implementation
const baseValueSchema = string()
.nullable()
.required(fieldErrorMessage)
.test('nonEmpty', fieldErrorMessage, (value) => value !== null);As @coliu-akamai pointed out, we encountered a special case where when the operator is selected and backspace is pressed it is showing us the default yup schema error message. And it was happening only when the operator was changed to So currently transforming the value to //Current implementation
const baseValueSchema = string()
.nullable()
.transform((value) => (value === null ? '' : value)) // normalize null to empty string to avoid the empty string case for TextField components
.required(fieldErrorMessage)
.test('nonEmpty', fieldErrorMessage, (value) => value !== '');This transformation is allowing it to display the proper error message. Will create a ticket to investigate the cause of this further and improve the validation schemas overall in the future PR's |
coliu-akamai
left a comment
There was a problem hiding this comment.
Confirming that for the filters, things are matching the preview videos
- Linode dimension filter
- Linode Region dimension filter
- VPC Subnet dimension filter
- Interface dimension filter validates inputs properly as expected
- translation of linode_id, subnet_id to the relevant labels in Show-details
We spoke async about the validation issue I mentioned earlier + it will be followed up on
|
closing in favor of #12817 |

Description 📝
Firewall dimension filters customization for Create/Edit/Show-details in Alerts
Changes 🔄
Scope 🚢
Upon production release, changes in this PR will be visible to:
Target release date 🗓️
Sept 9th
Preview 📷
Linode ID translation in Show-details
interface_id_customisation.mp4
vpc_subnet_dimension.mp4
firewall-linode-id-region-filter.mp4
How to test 🧪
Prerequisites
(How to setup test environment)
Verification steps
(How to verify changes)
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 ✅