Frun1na opened a new issue, #6124: URL: https://github.com/apache/rocketmq-dashboard/issues/6124
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `rocketmq-studio` branch, or I have stated the exact version I am running below. ### Studio Version branch: `rocketmq-studio` git commit id: `5e4c39b0` deployed as: reproduced by a unit test against that commit (the affected code is the web client) ### Runtime Environment OS: Ubuntu on WSL2 MySQL: not applicable — the defect is in the web client browser: not applicable — reproduced in a jsdom unit test (vitest + Testing Library) ### Connected RocketMQ Cluster RocketMQ version: not applicable — reproduced with a stubbed silence endpoint in a unit test access mode: not applicable deployment: not applicable ### Describe the Bug The maintenance-window dialog reports a failed read as "there are no maintenance windows". `web/src/pages/ops/systemAlerts.tsx` (base `5e4c39b0`): - `loadSilences` (`:373-387`) only toasts on failure (`sysAlerts.silenceLoadFailed`) and collects no failure state; - the dialog body renders `{silences.length === 0 && t('sysAlerts.noMaintenanceWindows')}` (`:993-995`), so a failed read shows "当前没有维护窗口" / "No maintenance windows.". The dialog is also the only place a maintenance window is created, so an operator who opens it while the read is failing concludes there are no windows in place — and can create a duplicate of one that already exists. There is no retry inside the dialog and the toast fades. The genuinely empty case (no windows configured) is indistinguishable from the failed read. ### Steps to Reproduce Reproduced by a unit test rather than against a cluster; the endpoint stub is the only setup needed: 1. Render `SystemAlertsPage` with `listAlertSilencesPage` rejecting (equivalently: open the dialog while `GET /api/system-alerts/silences` fails, e.g. a transient error). 2. Click 维护窗口. 3. The dialog body says "当前没有维护窗口". ### What Did You Expect to See? The dialog should say the windows could not be loaded and offer a retry. ### What Did You See Instead? "当前没有维护窗口" after a transient toast, in the same dialog that offers to create one. ### Additional Context - A fix with a regression test follows in a pull request. - The case is pinned by a unit test that fails on `5e4c39b0` (`expected document not to contain element, found <span …> 当前没有维护窗口 </span>`) and asserts the retry, which re-reads the page and restores the empty text for the genuinely empty result. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
