tju-yxq opened a new pull request, #5506:
URL: https://github.com/apache/rocketmq-dashboard/pull/5506
### Which Issue(s) This PR Fixes
- Fixes #5505
### Brief Description
Trims the four alert rule scope fields (`consumerGroup`, `topic`,
`clusterName`, `brokerName`) in `handleSubmit` before building the
create/update payload, so the saved rule matches the notification-template
preview that already trims the same fields — the previous gap meant a padded
paste produced a rule whose stored scope disagreed with the preview the user
confirmed.
### How Did You Test This Change?
```
cd web && npm test -- AlertsPage.test.tsx --run
Test Files 2 passed (2)
Tests 47 passed (47)
```
The existing suite covers the create/edit/validation flows including the
notification preview; the trims are additive on the happy path.
```
cd web && npm run lint
✖ 10 problems (0 errors, 10 warnings) # the trunk baseline
```
```
cd web && npx tsc -b --force
(no output — exit 0)
```
### 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
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
(no new UI text)
- [x] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) (no Java changes)
- [x] New source files carry the ASF license header (no new source files)
- [ ] Documentation touched where behaviour changed (normalization at the
form boundary)
--
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]