Skip to content

Commit 3b42f11

Browse files
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.
1 parent a26f527 commit 3b42f11

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

resources/scripts/components/server/ServerConsole.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default () => {
112112
className={'mr-1'}
113113
/>
114114
 {bytesToHuman(memory)}
115-
<span className={'text-neutral-500'}> / {server.limits.memory} MB</span>
115+
<span className={'text-neutral-500'}> / {bytesToHuman(server.limits.memory * 1000 * 1000)}</span>
116116
</p>
117117
<p className={'text-xs mt-2'}>
118118
<FontAwesomeIcon
@@ -121,7 +121,7 @@ export default () => {
121121
className={'mr-1'}
122122
/>
123123
&nbsp;{bytesToHuman(disk)}
124-
<span className={'text-neutral-500'}> / {server.limits.disk} MB</span>
124+
<span className={'text-neutral-500'}> / {bytesToHuman(server.limits.disk * 1000 * 1000)}</span>
125125
</p>
126126
</TitledGreyBox>
127127
{!server.isInstalling ?

resources/scripts/components/server/StatGraphs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ const chartDefaults: ChartConfiguration = {
1717
enabled: false,
1818
},
1919
animation: {
20-
duration: 250,
20+
duration: 0,
2121
},
2222
elements: {
2323
point: {
2424
radius: 0,
2525
},
2626
line: {
27-
tension: 0.1,
27+
tension: 0.3,
2828
backgroundColor: 'rgba(15, 178, 184, 0.45)',
2929
borderColor: '#32D0D9',
3030
},

0 commit comments

Comments
 (0)