tju-yxq opened a new pull request, #5395:
URL: https://github.com/apache/rocketmq-dashboard/pull/5395

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5394
   
   ### Brief Description
   
   Mirrors the `findRulesPage` NULL-tolerant domain filter in `findAlertsPage`: 
filtering BUSINESS now matches `domain IS NULL OR domain = 'BUSINESS'` (alert 
events recorded before the domain column existed keep NULL — the migration 
added it nullable without a default or backfill, and `parseDomain` reads NULL 
as BUSINESS), while any other domain keeps the exact equality. 
`findRelatedAlerts` inherits the fix through its window query. Sorting and all 
other filters are unchanged.
   
   ### How Did You Test This Change?
   
   ```
   cd server && mvn '-Dtest=MybatisPlusAlertRepositoryTest,AlertServiceTest' 
test
   [INFO] Tests run: 20,  Failures: 0, Errors: 0 -- in 
...MybatisPlusAlertRepositoryTest
   [INFO] Tests run: 83,  Failures: 0, Errors: 0 -- in ...AlertServiceTest
   [INFO] BUILD SUCCESS
   ```
   
   Two new repository tests capture the generated SQL: with `domain=BUSINESS` 
the WHERE clause now contains `domain IS NULL` and `domain =` with `BUSINESS` 
bound (plus the other filters still applied); with `domain=CLUSTER` it stays an 
exact equality with no `IS NULL`. The 83 AlertServiceTest cases confirm the 
service layer's feed, related-alerts and summarize behavior is untouched.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(no UI text)
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [x] New source files carry the ASF license header (no new source files)
   - [ ] Documentation touched where behaviour changed (no behavior change 
beyond the corrected filter)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to