ASUKAAAAA1204 opened a new pull request, #7117: URL: https://github.com/apache/rocketmq-dashboard/pull/7117
### Which Issue(s) This PR Fixes - Fixes #7080 ### Brief Description Mock mode stored any maintenance-window time range, so a window whose end precedes its start was reported as created even though the REST path rejects it: `AlertSilenceService.create` throws `BusinessException(400, "Silence end time must be after start time")` before persistence, while the Mock branch of `createAlertSilence` in `web/src/services/opsService.ts` only assigned an id and prepended the row. The Mock branch now enforces the same strictly-after ordering before it mutates `alertSilencesState`, so a rejected request leaves the inventory unchanged. Valid windows keep resolving and storing exactly as before. Scope is frontend Mock mode only; no backend or form behaviour changes. ### Verification - `npx vitest run src/services/opsService.test.ts` -> 18 passed (2 new regression tests: rejected invalid/equal ranges, still-accepted valid range) - `npx tsc -b` -> clean - Red/green: with the service change reverted, the new rejection test fails with `AssertionError: promise resolved ... instead of rejecting`, matching the report; with the change it passes. -- 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]
