@@ -6,6 +6,7 @@ import { faCircle } from '@fortawesome/free-solid-svg-icons/faCircle';
66import classNames from 'classnames' ;
77import { faMemory } from '@fortawesome/free-solid-svg-icons/faMemory' ;
88import { faMicrochip } from '@fortawesome/free-solid-svg-icons/faMicrochip' ;
9+ import { faHdd } from '@fortawesome/free-solid-svg-icons/faHdd' ;
910import { bytesToHuman } from '@/helpers' ;
1011import SuspenseSpinner from '@/components/elements/SuspenseSpinner' ;
1112import TitledGreyBox from '@/components/elements/TitledGreyBox' ;
@@ -42,6 +43,7 @@ const StopOrKillButton = ({ onPress }: { onPress: (action: PowerAction) => void
4243export default ( ) => {
4344 const [ memory , setMemory ] = useState ( 0 ) ;
4445 const [ cpu , setCpu ] = useState ( 0 ) ;
46+ const [ disk , setDisk ] = useState ( 0 ) ;
4547
4648 const server = ServerContext . useStoreState ( state => state . server . data ! ) ;
4749 const status = ServerContext . useStoreState ( state => state . status . value ) ;
@@ -58,6 +60,7 @@ export default () => {
5860
5961 setMemory ( stats . memory_bytes ) ;
6062 setCpu ( stats . cpu_absolute ) ;
63+ setDisk ( stats . disk_bytes ) ;
6164 } ;
6265
6366 const sendPowerCommand = ( command : PowerAction ) => {
@@ -92,6 +95,14 @@ export default () => {
9295 />
9396 { status }
9497 </ p >
98+ < p className = { 'text-xs mt-2' } >
99+ < FontAwesomeIcon
100+ icon = { faMicrochip }
101+ fixedWidth = { true }
102+ className = { 'mr-1' }
103+ />
104+ { cpu . toFixed ( 2 ) } %
105+ </ p >
95106 < p className = { 'text-xs mt-2' } >
96107 < FontAwesomeIcon
97108 icon = { faMemory }
@@ -103,11 +114,12 @@ export default () => {
103114 </ p >
104115 < p className = { 'text-xs mt-2' } >
105116 < FontAwesomeIcon
106- icon = { faMicrochip }
117+ icon = { faHdd }
107118 fixedWidth = { true }
108119 className = { 'mr-1' }
109120 />
110- { cpu . toFixed ( 2 ) } %
121+ { bytesToHuman ( disk ) }
122+ < span className = { 'text-neutral-500' } > / { server . limits . disk } MB</ span >
111123 </ p >
112124 </ TitledGreyBox >
113125 < Can action = { [ 'control.start' , 'control.stop' , 'control.restart' ] } matchAny = { true } >
0 commit comments