Show UptimeDuration for starting servers (#4284)

This commit is contained in:
Aspect 2022-10-04 22:12:07 -04:00 committed by GitHub
parent 7b91c38396
commit d7b387be3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -98,12 +98,12 @@ const ServerDetailsBlock = ({ className }: { className?: string }) => {
title={'Uptime'} title={'Uptime'}
color={getBackgroundColor(status === 'running' ? 0 : status !== 'offline' ? 9 : 10, 10)} color={getBackgroundColor(status === 'running' ? 0 : status !== 'offline' ? 9 : 10, 10)}
> >
{status === 'starting' || status === 'stopping' ? ( {status === null ? (
capitalize(status) "Offline"
) : stats.uptime > 0 ? ( ) : stats.uptime > 0 ? (
<UptimeDuration uptime={stats.uptime / 1000} /> <UptimeDuration uptime={stats.uptime / 1000} />
) : ( ) : (
'Offline' capitalize(status)
)} )}
</StatBlock> </StatBlock>
<StatBlock icon={faMicrochip} title={'CPU Load'} color={getBackgroundColor(stats.cpu, limits.cpu)}> <StatBlock icon={faMicrochip} title={'CPU Load'} color={getBackgroundColor(stats.cpu, limits.cpu)}>