From 3b42f110fb7d4a136ec96f71b659d7d9bbcc2ea7 Mon Sep 17 00:00:00 2001
From: Charles Morgan
Date: Wed, 27 May 2020 00:00:50 -0400
Subject: [PATCH] Show BytestoHuman value, not server limit, change graph
Changes server view to use bytestohuman to show 10 GB like it does on the main index.
Removed animation duration so the graph dosn't look likes it glitching when a new value is pushed, also made it a little more curved.
---
resources/scripts/components/server/ServerConsole.tsx | 4 ++--
resources/scripts/components/server/StatGraphs.tsx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/resources/scripts/components/server/ServerConsole.tsx b/resources/scripts/components/server/ServerConsole.tsx
index 5f5addf56..cf6ed5f50 100644
--- a/resources/scripts/components/server/ServerConsole.tsx
+++ b/resources/scripts/components/server/ServerConsole.tsx
@@ -112,7 +112,7 @@ export default () => {
className={'mr-1'}
/>
{bytesToHuman(memory)}
- / {server.limits.memory} MB
+ / {bytesToHuman(server.limits.memory * 1000 * 1000)}
{
className={'mr-1'}
/>
{bytesToHuman(disk)}
- / {server.limits.disk} MB
+ / {bytesToHuman(server.limits.disk * 1000 * 1000)}
{!server.isInstalling ?
diff --git a/resources/scripts/components/server/StatGraphs.tsx b/resources/scripts/components/server/StatGraphs.tsx
index 7de8a4d13..a7595b947 100644
--- a/resources/scripts/components/server/StatGraphs.tsx
+++ b/resources/scripts/components/server/StatGraphs.tsx
@@ -17,14 +17,14 @@ const chartDefaults: ChartConfiguration = {
enabled: false,
},
animation: {
- duration: 250,
+ duration: 0,
},
elements: {
point: {
radius: 0,
},
line: {
- tension: 0.1,
+ tension: 0.3,
backgroundColor: 'rgba(15, 178, 184, 0.45)',
borderColor: '#32D0D9',
},