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<
78
78
BrokersTableRow [ 'inSyncReplicas' ]
79
79
> ;
80
80
81
- export const InSyncReplicas = ( { row } : InSyncReplicasProps ) => {
82
- const { replicas, inSyncReplicas } = row . original ;
81
+ export const InSyncReplicas = ( { getValue } : InSyncReplicasProps ) => {
82
+ return < ColoredCell value = { getValue ( ) || '' } /> ;
83
+ } ;
83
84
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' ] > ;
91
86
92
- return (
93
- < ColoredCell
94
- value = { value }
95
- attention = { inSyncReplicas < replicas }
96
- />
97
- ) ;
87
+ export const Replicas = ( { getValue } : ReplicasProps ) => {
88
+ return < ColoredCell value = { getValue ( ) || '' } /> ;
98
89
} ;
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ export const getBrokersTableColumns = () => {
61
61
header : 'In Sync Replicas' ,
62
62
cell : Cell . InSyncReplicas ,
63
63
} ) ,
64
+ columnHelper . accessor ( 'replicas' , {
65
+ header : 'Replicas' ,
66
+ cell : Cell . Replicas ,
67
+ } ) ,
64
68
columnHelper . accessor ( 'replicasSkew' , {
65
69
header : SkewHeader ,
66
70
cell : Cell . Skew ,
You can’t perform that action at this time.
0 commit comments