File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
frontend/src/components/Brokers/BrokersList/TableCells Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,15 @@ type InSyncReplicasProps = CellContext<
78
78
BrokersTableRow [ 'inSyncReplicas' ]
79
79
> ;
80
80
81
- export const InSyncReplicas = ( { getValue } : InSyncReplicasProps ) => {
82
- return < ColoredCell value = { getValue ( ) || '' } /> ;
81
+ export const InSyncReplicas = ( { getValue, row } : InSyncReplicasProps ) => {
82
+ const inSyncReplicas = getValue ( ) ;
83
+ const { replicas } = row . original ;
84
+ if ( inSyncReplicas === undefined || replicas === undefined ) {
85
+ return null ;
86
+ }
87
+ return (
88
+ < ColoredCell value = { inSyncReplicas } attention = { inSyncReplicas < replicas } />
89
+ ) ;
83
90
} ;
84
91
85
92
type ReplicasProps = CellContext < BrokersTableRow , BrokersTableRow [ 'replicas' ] > ;
You can’t perform that action at this time.
0 commit comments