yyqdbngt opened a new pull request, #2056:
URL: https://github.com/apache/rocketmq-dashboard/pull/2056
## What is the purpose of the change
Fix #1986.
The persisted alert-rule editor rendered clusterName and brokerName as a
PromQL selector in the expression field, but toAlertRuleRequest later submitted
the entire metric{labels} fragment as metric and omitted both scope fields.
Editing and saving therefore dropped the cluster and broker scope.
## Brief changelog
- AlertManagement: parse cluster and broker labels out of the expression
when building the update request and preserve them in clusterName/brokerName
- other labels (e.g. job) are kept in the metric expression
## How was this patch verified
- npx vitest run src/pages/studio/__tests__/AlertManagement.test.tsx (9
passed)
- npx tsc -b clean
- npx eslint . clean
--
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]