123123213weqw opened a new pull request, #2574: URL: https://github.com/apache/rocketmq-dashboard/pull/2574
## What is the purpose of the change The backend reports ``-1`` (``ConsumerLagResolver.UNKNOWN``) when a consumer lag cannot be determined, e.g. RocketMQ 5.0 gRPC consumers without proxy stats. The UI treated that sentinel like any other number: it rendered as a green low-backlog value in the group tables, counted it into the total backlog, and let an online group with an unknown lag look healthy and fully determined. ## Brief changelog - add a shared ``consumerLag`` helper (``isLagAvailable``/``formatLag``/``lagSortValue``) - GroupManagement and the consumer page now render unknown lags as a neutral "unavailable" label instead of a colored number - an unknown lag no longer triggers the backlog warning status or the backlog color, and the queue progress total is marked unavailable when any queue reports an unknown lag - unknown lags sort after every group with a known backlog in the lag-descending order and in the table column sorter ## How was this patch verified - new ``consumerLag`` unit tests (3/3), two GroupManagement page tests (unknown lag renders "unavailable" without a backlog warning, detail label) and two consumer page tests (table + detail label, lag-desc order) — all green - ``tsc -b`` and ``eslint`` clean on the touched files - the two client-stack tests in ConsumerPage fail identically on the clean base branch in this environment (timing-sensitive), unrelated to this change Fixes #2500 -- 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]
