diff --git a/resources/scripts/components/dashboard/ServerRow.tsx b/resources/scripts/components/dashboard/ServerRow.tsx index e300e7611..a212bce0c 100644 --- a/resources/scripts/components/dashboard/ServerRow.tsx +++ b/resources/scripts/components/dashboard/ServerRow.tsx @@ -52,6 +52,8 @@ export default ({ server, className }: { server: Server; className: string | und alarms.memory = isAlarmState(stats.memoryUsageInBytes, server.limits.memory); alarms.disk = server.limits.disk === 0 ? false : isAlarmState(stats.diskUsageInBytes, server.limits.disk); } + const disklimit = server.limits.disk != 0 ? bytesToHuman(server.limits.disk * 1000 * 1000) : "Unlimited"; + const memorylimit = server.limits.memory != 0 ? bytesToHuman(server.limits.memory * 1000 * 1000) : "Unlimited"; return ( @@ -127,7 +129,7 @@ export default ({ server, className }: { server: Server; className: string | und {bytesToHuman(stats.memoryUsageInBytes)}

-

of {bytesToHuman(server.limits.memory * 1000 * 1000)}

+

of {memorylimit}

@@ -147,9 +149,7 @@ export default ({ server, className }: { server: Server; className: string | und {bytesToHuman(stats.diskUsageInBytes)}

-

- of {bytesToHuman(server.limits.disk * 1000 * 1000)} -

+

of {disklimit}

} diff --git a/resources/scripts/components/server/ServerConsole.tsx b/resources/scripts/components/server/ServerConsole.tsx index cf6ed5f50..16675b35e 100644 --- a/resources/scripts/components/server/ServerConsole.tsx +++ b/resources/scripts/components/server/ServerConsole.tsx @@ -81,6 +81,9 @@ export default () => { }; }, [ instance, connected ]); + const disklimit = server.limits.disk != 0 ? bytesToHuman(server.limits.disk * 1000 * 1000) : "Unlimited"; + const memorylimit = server.limits.memory != 0 ? bytesToHuman(server.limits.memory * 1000 * 1000) : "Unlimited"; + return (
@@ -112,8 +115,8 @@ export default () => { className={'mr-1'} />  {bytesToHuman(memory)} - / {bytesToHuman(server.limits.memory * 1000 * 1000)} -

+ / {memorylimit} +

{ className={'mr-1'} />  {bytesToHuman(disk)} - / {bytesToHuman(server.limits.disk * 1000 * 1000)} + / {disklimit}

{!server.isInstalling ?