File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
resources/scripts/components/server/console Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import UptimeDuration from '@/components/server/UptimeDuration';
1515import StatBlock from '@/components/server/console/StatBlock' ;
1616import useWebsocketEvent from '@/plugins/useWebsocketEvent' ;
1717import classNames from 'classnames' ;
18+ import { capitalize } from '@/lib/strings' ;
1819
1920type Stats = Record < 'memory' | 'cpu' | 'disk' | 'uptime' | 'rx' | 'tx' , number > ;
2021
@@ -97,7 +98,13 @@ const ServerDetailsBlock = ({ className }: { className?: string }) => {
9798 title = { 'Uptime' }
9899 color = { getBackgroundColor ( status === 'running' ? 0 : status !== 'offline' ? 9 : 10 , 10 ) }
99100 >
100- { stats . uptime > 0 ? < UptimeDuration uptime = { stats . uptime / 1000 } /> : 'Offline' }
101+ { status === 'starting' || status === 'stopping' ? (
102+ capitalize ( status )
103+ ) : stats . uptime > 0 ? (
104+ < UptimeDuration uptime = { stats . uptime / 1000 } />
105+ ) : (
106+ 'Offline'
107+ ) }
101108 </ StatBlock >
102109 < StatBlock icon = { faMicrochip } title = { 'CPU Load' } color = { getBackgroundColor ( stats . cpu , limits . cpu ) } >
103110 { status === 'offline' ? (
You can’t perform that action at this time.
0 commit comments