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.
This commit is contained in:
Charles Morgan 2020-05-27 00:00:50 -04:00
parent a26f527f44
commit 3b42f110fb
No known key found for this signature in database
GPG key ID: D71946CD723249BD
2 changed files with 4 additions and 4 deletions

View file

@ -112,7 +112,7 @@ export default () => {
className={'mr-1'}
/>
 {bytesToHuman(memory)}
<span className={'text-neutral-500'}> / {server.limits.memory} MB</span>
<span className={'text-neutral-500'}> / {bytesToHuman(server.limits.memory * 1000 * 1000)}</span>
</p>
<p className={'text-xs mt-2'}>
<FontAwesomeIcon
@ -121,7 +121,7 @@ export default () => {
className={'mr-1'}
/>
&nbsp;{bytesToHuman(disk)}
<span className={'text-neutral-500'}> / {server.limits.disk} MB</span>
<span className={'text-neutral-500'}> / {bytesToHuman(server.limits.disk * 1000 * 1000)}</span>
</p>
</TitledGreyBox>
{!server.isInstalling ?

View file

@ -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',
},