File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed
frontend/src/components/Brokers/BrokersList Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -78,21 +78,12 @@ type InSyncReplicasProps = CellContext<
7878 BrokersTableRow [ 'inSyncReplicas' ]
7979> ;
8080
81- export const InSyncReplicas = ( { row } : InSyncReplicasProps ) => {
82- const { replicas, inSyncReplicas } = row . original ;
81+ export const InSyncReplicas = ( { getValue } : InSyncReplicasProps ) => {
82+ return < ColoredCell value = { getValue ( ) || '' } /> ;
83+ } ;
8384
84- if (
85- replicas === undefined ||
86- inSyncReplicas === undefined
87- ) {
88- return null ;
89- }
90- const value = `${ inSyncReplicas } of ${ replicas } ` ;
85+ type ReplicasProps = CellContext < BrokersTableRow , BrokersTableRow [ 'replicas' ] > ;
9186
92- return (
93- < ColoredCell
94- value = { value }
95- attention = { inSyncReplicas < replicas }
96- />
97- ) ;
87+ export const Replicas = ( { getValue } : ReplicasProps ) => {
88+ return < ColoredCell value = { getValue ( ) || '' } /> ;
9889} ;
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ export const getBrokersTableColumns = () => {
6161 header : 'In Sync Replicas' ,
6262 cell : Cell . InSyncReplicas ,
6363 } ) ,
64+ columnHelper . accessor ( 'replicas' , {
65+ header : 'Replicas' ,
66+ cell : Cell . Replicas ,
67+ } ) ,
6468 columnHelper . accessor ( 'replicasSkew' , {
6569 header : SkewHeader ,
6670 cell : Cell . Skew ,
You can’t perform that action at this time.
0 commit comments