fix broker hosts and ports bug (#1881)

This commit is contained in:
Arsen Simonyan 2022-04-22 13:38:17 +04:00 committed by GitHub
parent 62f4778803
commit e9260cf9cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,17 +128,21 @@ const Brokers: React.FC = () => {
{diskUsage &&
diskUsage.length !== 0 &&
diskUsage.map(({ brokerId, segmentSize, segmentCount }) => (
diskUsage.map(({ brokerId, segmentSize, segmentCount }) => {
const brokerItem = items?.find((item) => item.id === brokerId);
return (
<tr key={brokerId}>
<td>{brokerId}</td>
<td>
<BytesFormatted value={segmentSize} />
</td>
<td>{segmentCount}</td>
<td>{items && items[brokerId]?.port}</td>
<td>{items && items[brokerId]?.host}</td>
<td>{brokerItem?.port}</td>
<td>{brokerItem?.host}</td>
</tr>
))}
);
})}
</tbody>
</Table>
</>