tju-yxq opened a new pull request, #5570:
URL: https://github.com/apache/rocketmq-dashboard/pull/5570

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5569
   
   ### Brief Description
   
   Converts the client connection diagnostics utility to the key-returning 
contract that `messageTraceDiagnostics` established (and #5564/#5566/#5568 
applied to the consumer, route, and ACL diagnostics), so the diagnostics panel 
follows the display language:
   
   - **`clientConnectionDiagnostics.ts`**: `statusText` → `statusKey`; issues 
carry `titleKey` / `descriptionKey` / `recommendationKey` instead of `title` / 
`description` / `recommendation`; `recommendations` → `recommendationKeys`. All 
texts are static, so no params are needed; `evidence` stays raw data. Codes, 
severities, scoring, resource summaries, and the dedup/6-cap recommendation 
builder are untouched.
   - **`clients.tsx`** (diagnostics panel): the status line, the issue table's 
title/description cells (including their hover titles), and the recommendations 
list resolve through `t()`.
   - **`translations.ts`**: 43 new `clientDiag.*` entries; the zh text is 
byte-identical to what the utility returned before.
   - **`clientConnectionDiagnostics.test.ts`**: the default-recommendation 
assertion now checks the key.
   
   ### How Did You Test This Change?
   
   ```
   cd web && npx vitest run src/utils/clientConnectionDiagnostics.test.ts
    Test Files  1 passed (1)
         Tests  5 passed (5)   # default-recommendation assertion now checks 
the key
   
   cd web && npx vitest run src/pages/cluster/__tests__/ClientsPage.test.tsx
    Test Files  1 passed (1)
         Tests  22 passed (22)   # including 'renders client connection 
diagnostics for risky inventories'
   
   cd web && npx eslint src/utils/clientConnectionDiagnostics.ts 
src/pages/cluster/clients.tsx src/i18n/translations.ts
   (no output — 0 errors, 0 warnings)
   
   cd web && npx tsc --noEmit
   (no output — exit 0)
   ```
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in (one 
diagnostics util + its page render sites + its test, per the key-returning 
theme)
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test` (util test updated to the new return shape; the page suite passes 
unchanged because the zh render is byte-identical)
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(43 new `clientDiag.*` keys)
   - [x] Architecture constraints stay green (no Java changes)
   - [x] New source files carry the ASF license header (no new source files)
   - [ ] Documentation touched where behaviour changed (internal contract + 
display strings only)
   


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