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

   ## Summary
   
   Add a "复制属性 JSON" (copy properties as JSON) action to the message detail
   modal on the Message page. It serializes the selected message's `properties`
   object with `JSON.stringify(..., null, 2)` and writes it to the clipboard via
   `navigator.clipboard.writeText`, with a `textarea` + `document.execCommand`
   fallback for non-secure contexts. The button is disabled (with a "该消息无属性"
   hint) when the message has no properties.
   
   ## Why
   
   Operators inspecting a message currently have no way to grab its properties
   as a machine-readable payload; the message body is copyable but the
   key/value properties are not rendered on the detail view. This makes pasting
   properties into a ticket or script one click instead of retyping them.
   
   ## Testing
   
   - `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json` — passes (exit 0)
   - `./node_modules/.bin/vitest run 
src/pages/instance/__tests__/MessagePage.test.tsx`
     (Node 20 build server) — **12/12 passed**, including two new cases:
     - clicking the action writes `{"KEYS":"abc","TAGS":"vip"}` to the 
clipboard;
     - the action is disabled and shows the no-properties hint for messages with
       an empty `properties` object.
   


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