File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -72,19 +72,13 @@ const TopicTable: React.FC = () => {
7272 size : 148 ,
7373 } ,
7474 {
75+ id : TopicColumnsToSort . MESSAGES_COUNT ,
7576 header : 'Number of messages' ,
76- accessorKey : 'partitions' ,
77- enableSorting : false ,
78- 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 ) ;
77+ accessorKey : 'messagesCount' ,
78+ cell : ( args ) => {
79+ return args . getValue ( ) ?? 'N/A' ;
8780 } ,
81+ size : 146 ,
8882 } ,
8983 {
9084 id : TopicColumnsToSort . SIZE ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export const internalTopicPayload = {
1717 segmentSize : 0 ,
1818 segmentCount : 1 ,
1919 underReplicatedPartitions : 0 ,
20+ messagesCount : 0 ,
2021 partitions : [
2122 {
2223 partition : 0 ,
@@ -38,6 +39,7 @@ export const externalTopicPayload = {
3839 segmentSize : 1263 ,
3940 segmentCount : 1 ,
4041 underReplicatedPartitions : 0 ,
42+ messagesCount : 0 ,
4143 partitions : [
4244 {
4345 partition : 0 ,
You can’t perform that action at this time.
0 commit comments