fix: fix display problem in docker panel

This commit is contained in:
moonrailgun 2024-05-21 23:04:19 +08:00
parent 3ecd7aa171
commit e3d0555c45

View File

@ -54,16 +54,20 @@ export const ServerRowExpendView: React.FC<{ row: ServerStatusInfo }> =
cell: (props) => cell: (props) =>
props props
.getValue() .getValue()
.map((item, i) => ( .map((item, i) =>
<div item.IP ? (
key={i} <div
>{`${item.IP}:${item.PublicPort} -> ${item.PrivatePort} / ${item.Type}`}</div> key={i}
)), >{`${item.IP}:${item.PublicPort} -> ${item.PrivatePort} / ${item.Type}`}</div>
) : (
<div key={i}>{`${item.PrivatePort} / ${item.Type}`}</div>
)
),
}), }),
columnHelper.accessor('cpuPercent', { columnHelper.accessor('cpuPercent', {
header: 'CPU(%)', header: 'CPU(%)',
size: 90, size: 90,
cell: (props) => `${props.getValue() * 100}%`, cell: (props) => `${Number(props.getValue().toFixed(2))}%`,
}), }),
columnHelper.display({ columnHelper.display({
header: t('Memory'), header: t('Memory'),