Frun1na opened a new pull request, #4814:
URL: https://github.com/apache/rocketmq-dashboard/pull/4814

   ### Which Issue(s) This PR Fixes
   
   - Fixes #ISSUE_ID
   
   ### Brief Description
   
   Sections 10 (clients) and 11-13 (alerting, system alerts, audit) documented 
request parameters,
   enum values, field names and response shapes that do not match the 
controllers. Every correction was
   read back from the implementation:
   
   | Section | Document said | The code does |
   |---|---|---|
   | 10.1 client list | query params `{clusterId, type}`; language `C++` / `C#` 
/ `Node.js` | `namesrvAddr` is a **required** query parameter 
(`ClientController:34`) — calls built from the document fail with 400; 
`ClientLanguage` values are `Cpp` / `CSharp` / `NodeJS` (the appendix already 
lists them correctly; the body contradicted it); the VO also carries 
undocumented `producerGroup` and `partial` fields |
   | 11.1 `AlertRule` | `id` string; metric `磁盘使用率` etc.; operator `>` / `<` / 
`>=` / `<=`; duration `1分钟` / `5分钟`; no severity/aggregation/scoping fields | 
`id` is a `Long`; `metric` is a Prometheus metric name or semantic key; 
`operator` also accepts `==` / `!=` / `UNAVAILABLE`; `duration` is a Prometheus 
duration (`(?:[0-9]+(?:ms|s|m|h|d|w|y))+` — `1分钟` is rejected with 400); the 
VO/DTO carry `domain`, `aggregation`, `windowSeconds`, `severity`, 
`brokerName`, `clusterName`, `instanceId`, `consumerGroup`, `topic`, 
`consecutiveSamples`, `reminderInterval`, `notificationTemplate` 
(`AlertRuleRequestDTO`, `AlertRuleVO`) |
   | 11.2 / 11.3 create & update | `metric` / `operator` / `threshold` / 
`duration` / `channels` all required; `id` string | only `name` is `@NotBlank`; 
update additionally requires `id` (400 `"id is required"`, 
`AlertRuleController:100-102`) |
   | 11.4 / 11.5 toggle & delete | `id` string | `id` is a `Long` |
   | 12.1 `SystemAlert` | `id` string; `time` short `HH:mm`; 6 fields | `id` is 
a `Long` (`SystemAlertVO:33`); `time` is a `LocalDateTime` serialized as ISO 
8601; the VO also carries `acknowledgedBy`, `acknowledgedAt`, `domain`, 
`ruleId`, `fingerprint`, `transition`, `instanceId`, `currentValue`, 
`notificationSuppressed`, `suppressionCauseAlertId`, `suppressionReason`, 
`labels` |
   | 12.2 acknowledge | `id` string | `AcknowledgeSystemAlertDTO.id` is a 
`Long` (`@NotNull`) |
   | 13.4 audit cleanup | `beforeDays` required `1-365` | optional, defaults to 
30, `@Max(365)` (`AuditController:91`, `AuditCleanupDTO`) |
   
   The Chinese display strings the document listed for `metric` and `duration` 
(`磁盘使用率`, `1分钟`)
   never reach the API: the request validator rejects the duration form 
outright, so an integrator
   copying the documented example gets a 400 on the first call.
   
   ### How Did You Test This Change
   
   Documentation-only change; there is no docs build or spec validation to run. 
Every claim in the table
   was verified by reading the controller mapping, the DTO validation 
annotations and the VO field
   declarations directly (files cited per row).
   


-- 
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]

Reply via email to