Skip to content

Commit 7c6573b

Browse files
committed
Read messages count from backend
1 parent 900fbee commit 7c6573b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

frontend/src/components/Topics/List/TopicTable.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,8 @@ const TopicTable: React.FC = () => {
7474
{
7575
id: TopicColumnsToSort.MESSAGES_COUNT,
7676
header: 'Number of messages',
77-
accessorKey: 'partitions',
77+
accessorKey: 'messageCount',
7878
size: 146,
79-
cell: ({ getValue }) => {
80-
const partitions = getValue<Topic['partitions']>();
81-
if (partitions === undefined || partitions.length === 0) {
82-
return 0;
83-
}
84-
return partitions.reduce((memo, { offsetMax, offsetMin }) => {
85-
return memo + (offsetMax - offsetMin);
86-
}, 0);
87-
},
8879
},
8980
{
9081
id: TopicColumnsToSort.SIZE,

0 commit comments

Comments
 (0)