🐛 fix(dashboard): Correct progress value calculations and update groupId accessor
This commit is contained in:
parent
5766376590
commit
36c76674b6
@ -54,21 +54,21 @@ export function NodeStatusCell({ status }: { status: API.NodeStatus }) {
|
||||
<span>CPU</span>
|
||||
<span>{formatPercentage(serverStatus?.cpu ?? 0)}</span>
|
||||
</div>
|
||||
<Progress value={(serverStatus?.cpu ?? 0) * 100} className='h-2' max={100} />
|
||||
<Progress value={serverStatus?.cpu ?? 0} className='h-2' max={100} />
|
||||
</div>
|
||||
<div className='flex flex-col space-y-1'>
|
||||
<div className='flex justify-between'>
|
||||
<span>{t('memory')}</span>
|
||||
<span>{formatPercentage(serverStatus?.mem ?? 0)}</span>
|
||||
</div>
|
||||
<Progress value={(serverStatus?.mem ?? 0) * 100} className='h-2' max={100} />
|
||||
<Progress value={serverStatus?.mem ?? 0} className='h-2' max={100} />
|
||||
</div>
|
||||
<div className='flex flex-col space-y-1'>
|
||||
<div className='flex justify-between'>
|
||||
<span>{t('disk')}</span>
|
||||
<span>{formatPercentage(serverStatus?.disk ?? 0)}</span>
|
||||
</div>
|
||||
<Progress value={(serverStatus?.disk ?? 0) * 100} className='h-2' max={100} />
|
||||
<Progress value={serverStatus?.disk ?? 0} className='h-2' max={100} />
|
||||
</div>
|
||||
{isOnline && (
|
||||
<div>
|
||||
|
||||
@ -145,10 +145,10 @@ export default function NodeTable() {
|
||||
},
|
||||
|
||||
{
|
||||
accessorKey: 'groupId',
|
||||
accessorKey: 'group_id',
|
||||
header: t('nodeGroup'),
|
||||
cell: ({ row }) => {
|
||||
const name = groups?.find((group) => group.id === row.getValue('groupId'))?.name;
|
||||
const name = groups?.find((group) => group.id === row.getValue('group_id'))?.name;
|
||||
return name ? <Badge variant='outline'>{name}</Badge> : '--';
|
||||
},
|
||||
},
|
||||
|
||||
@ -115,7 +115,10 @@ export function RevenueStatisticsCard() {
|
||||
y={viewBox.cy}
|
||||
className='fill-foreground text-2xl font-bold'
|
||||
>
|
||||
{RevenueStatistics?.today.amount_total}
|
||||
{unitConversion(
|
||||
'centsToDollars',
|
||||
RevenueStatistics?.today.amount_total,
|
||||
)}
|
||||
</tspan>
|
||||
</text>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user