Skip to content

Commit

Permalink
fix: fix display problem in docker panel
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed May 21, 2024
1 parent 3ecd7aa commit e3d0555
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/client/components/server/ServerRowExpendView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,20 @@ export const ServerRowExpendView: React.FC<{ row: ServerStatusInfo }> =
cell: (props) =>
props
.getValue()
.map((item, i) => (
<div
key={i}
>{`${item.IP}:${item.PublicPort} -> ${item.PrivatePort} / ${item.Type}`}</div>
)),
.map((item, i) =>
item.IP ? (
<div
key={i}
>{`${item.IP}:${item.PublicPort} -> ${item.PrivatePort} / ${item.Type}`}</div>
) : (
<div key={i}>{`${item.PrivatePort} / ${item.Type}`}</div>
)
),
}),
columnHelper.accessor('cpuPercent', {
header: 'CPU(%)',
size: 90,
cell: (props) => `${props.getValue() * 100}%`,
cell: (props) => `${Number(props.getValue().toFixed(2))}%`,
}),
columnHelper.display({
header: t('Memory'),
Expand Down

0 comments on commit e3d0555

Please sign in to comment.