123123213weqw opened a new issue, #5228:
URL: https://github.com/apache/rocketmq-dashboard/issues/5228
### Before creating
- [x] I have searched the existing issues and found no duplicate (#4610
covered the audit and alert tables; this is the consumer group table).
- [x] I have checked the latest `rocketmq-studio` branch where this problem
still exists.
### Bug report
**Which page or component**
`web/src/pages/instance/consumer.tsx` — the consumer group table.
**What happened**
The table is genuinely server-paginated: `loadConsumerGroupPage` calls
`listConsumerGroupPage({ page, pageSize })`, `dataSource` holds only the
current page (`result.items`), and `pagination.total` comes from the server
(`result.total`). Yet eight columns carry client-side comparator functions —
`sorter: (a, b) => a.name.localeCompare(b.name)` (name, subscription type,
subscription mode, total lag, delay, gmtCreate, gmtModified) — so clicking a
column header reorders **only the loaded page** while the UI presents it as a
sort over the whole result set. With 500 groups and page size 20, "sort by
total lag desc" shows the top of page 1, not the top overall — the exact defect
#4610 described for the audit/alert tables (fixed there by #4616 with
server-side `sortField`/`sortOrder`).
**Steps to reproduce**
1. Open an instance with several pages of consumer groups.
2. Sort by 总堆积量 (total lag) descending.
3. The largest lag in the whole fleet may not be on the first page; only the
current page's 20 rows are reordered.
**Expected behaviour**
The #4616 contract on this surface: `/groups/page` accepts `sortField`
(allowlist matching the sortable columns) and `sortOrder`, validated with HTTP
400 and a stable tiebreaker; the providers sort before paging (the
`InstanceProvider.listConsumerGroupsPage` default already pages in memory over
the full list, so the default method can apply the comparator); the table's
`onChange` sorter state drives a refetch.
**Environment**
branch `rocketmq-studio`, commit `4ee173ad`; verified by reading
`loadConsumerGroupPage` and the column definitions.
--
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]