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

   ## Summary
   
   在消息查询结果表格上方新增「导出 CSV」按钮,将当前查询结果列表(页面 state 中的消息记录)导出为 CSV。按钮在结果为空或查询进行中时禁用。
   
   导出列:Message ID, Topic, Queue ID, Offset, Key, Tag, Store Time, Born Host, 
Size(全部取自现有 `MessageRecord` 字段)。文件名为 
`rocketmq-messages-<topic>-YYYY-MM-DD.csv`(topic 做文件名安全清洗)。复用 
`web/src/utils/download.ts` 的 `buildCsv` / `downloadCsv`。
   
   ## Why
   
   用户需要把查询结果导出到 Excel 或其他工具做离线分析;现有单条「下载」只导出单条消息正文,无法批量导出查询结果。
   
   ## Testing
   
   - 本地编译:`cd web && ./node_modules/.bin/tsc -b tsconfig.app.json`(exit 0)
   - 前端测试(服务器):`./node_modules/.bin/vitest run 
src/pages/instance/__tests__/MessagePage.test.tsx 
src/pages/instance/__tests__/MessagePageAsyncState.test.tsx` — 2 files / 28 
tests 全绿;新增用例覆盖:空结果按钮禁用、查询成功后点击触发 `downloadCsv`(mock)、文件名与 CSV 内容断言。
   


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