Frun1na opened a new issue, #6086: URL: https://github.com/apache/rocketmq-dashboard/issues/6086
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `rocketmq-studio` branch, or I have stated the exact version I am running below. ### Studio Version branch: rocketmq-studio git commit id: 5e4c39b0 deployed as: reproduced by a unit test against that commit ### Runtime Environment OS: Ubuntu on WSL2 MySQL: not applicable — the defect is in the REST contract and in the console rendering, not in persistence browser (for UI issues): not applicable — reproduced with jsdom in a vitest run ### Connected RocketMQ Cluster not applicable — reproduced with stubbed connections in a unit test. Every provider builds this view from the broker `ProducerInfo` / `Connection` payloads or from the proxy consumer list, and none of those carry a connection time. ### Describe the Bug `ClientConnectionVO.connectedAt` is declared and serialized, but no provider ever assigns it, so the clients page offers a "Heartbeat" column that can never have a value. - `RocketMQClientProvider.toConnectionVO(ProducerInfo, ...)` (`RocketMQClientProvider.java:327-342`) and `toConnectionVO(Connection, ...)` (`:455-471`) both build the VO without `connectedAt`, and the proxy branch passes no timestamp either. A search for `connectedAt` across `server/src/main/java` finds the field declaration and nothing else; the only code that ever sets it is `ClientControllerTest`. - `web/src/pages/cluster/clients.tsx` binds a table column (`cluster.heartbeat`, `:508-519`), a CSV export column (`Connected At`, `:130`) and a detail row (`:1026`) to that field, so all three read `-` on every real deployment. - `web/src/utils/clientConnectionDiagnostics.ts:351-367` raises `INVALID_CONNECTION_TIME` only when `connectedAt` is present but unparseable, so the rule can never fire either. - `web/src/mock/clients.ts` supplies `connectedAt` for all 20 mock connections, which is why the column looks populated in mock mode. ### Steps to Reproduce 1. Run the frontend suite at `5e4c39b0` with the new case added in the pull request below: `cd web && npx vitest run src/pages/cluster/__tests__/ClientsPage.test.tsx` 2. Or, against a live deployment: open the clients page (`/clients` under an online cluster) and read the "心跳时间 / Heartbeat" column; export the table as CSV and read the "Connected At" column. ### What Did You Expect to See? No control that displays a connection time, since the API cannot supply one — or an API that does supply it. Today the page claims the information exists and shows an empty cell, which reads as "this client never sent a heartbeat" rather than "this build does not collect it". ### What Did You See Instead? Every row of the "心跳时间 / Heartbeat" column reads `-`, the CSV's "Connected At" column is empty for every row, the connection detail dialog shows `-`, and the `INVALID_CONNECTION_TIME` diagnostic is unreachable. The mock-mode fixture is the only place where the column has a value. ### Additional Context `#5600` removed the NameServer tab's fabricated "Connections" column for the same reason — the field was `0` for every row and was dropped instead of being filled with a guess. This is the same situation, except the field is never written at all. A fix with a regression test follows in a pull request. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
