Aias00 opened a new pull request, #1958:
URL: https://github.com/apache/rocketmq-dashboard/pull/1958
## What is the purpose of the change
Make the Track 1 alert-rule form submit the same metric identifiers and
duration syntax that the backend and Prometheus rule exporter expect.
## Brief changelog
- Keep localized labels in the alert-rule form while using stable Prometheus
metric IDs as Select values.
- Submit durations such as `5m` instead of localized text such as `5分钟`.
- Derive threshold units from the stable metric ID and preserve units for
existing custom metrics.
- Align mock alert data with the real API contract.
- Add a UI regression test covering the create-rule payload.
## Verifying this change
```bash
cd web
npm test
npm run build
./node_modules/.bin/eslint --max-warnings=0 \
src/pages/ops/alerts.tsx \
src/pages/ops/alertRulePayload.ts \
src/pages/ops/__tests__/alerts.test.ts \
src/pages/ops/__tests__/AlertsPage.test.tsx \
src/mock/alerts.ts
```
Full `npm run lint -- --max-warnings=0` still reports pre-existing errors in
`MainLayout.tsx` and `BrokerCluster.tsx`; the changed files pass ESLint.
Closes #1957
--
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]