This commit is contained in:
yhqe committed 2026-04-25 22:57:03 -05:00
1 parent e3d5fb8ba1
commit 61650ea33f
1 file changed
+6 -5
+6 -5
View File
@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { onMount, onDestroy } from "svelte"; import { onMount, onDestroy } from "svelte";
const HOSTNAME = "shitbox"; const HOSTNAME = "solar";
const REFRESH_MS = 5000; const REFRESH_MS = 5000;
let stats = $state<any>(null); let stats = $state<any>(null);
@@ -9,8 +9,8 @@
let network = $state<any[]>([]); let network = $state<any[]>([]);
function fmtBytes(b: number) { function fmtBytes(b: number) {
if (b < 1073741824) return (b / 1048576).toFixed(1) + " MB"; if (b < 1073741824) return (b / 1048576).toFixed(1) + " mb";
return (b / 1073741824).toFixed(2) + " GB"; return (b / 1073741824).toFixed(2) + " gb";
} }
function bar(val: number, max: number, len = 18) { function bar(val: number, max: number, len = 18) {
@@ -63,7 +63,7 @@
<div class="row"> <div class="row">
<span class="key">mem</span> <span class="key">mem</span>
<span class="bar">{bar(used, total)}</span> <span class="bar">{bar(used, total)}</span>
<span class="val">{used} / {total} MB</span> <span class="val">{used} / {total} mb</span>
</div> </div>
<div class="row"> <div class="row">
<span class="key">disk</span> <span class="key">disk</span>
@@ -94,7 +94,7 @@
</section> </section>
<section> <section>
<div class="section-label">network</div> <div class="section-label">network (since last boot)</div>
{#each network as iface} {#each network as iface}
<div class="row"> <div class="row">
<span class="key">{iface.name}</span> <span class="key">{iface.name}</span>
@@ -131,6 +131,7 @@
main { main {
padding: 3.5rem 4rem; padding: 3.5rem 4rem;
max-width: 640px; max-width: 640px;
text-transform: lowercase;
} }
header { header {