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">
import { onMount, onDestroy } from "svelte";
const HOSTNAME = "shitbox";
const HOSTNAME = "solar";
const REFRESH_MS = 5000;
let stats = $state<any>(null);
@@ -9,8 +9,8 @@
let network = $state<any[]>([]);
function fmtBytes(b: number) {
if (b < 1073741824) return (b / 1048576).toFixed(1) + " MB";
return (b / 1073741824).toFixed(2) + " GB";
if (b < 1073741824) return (b / 1048576).toFixed(1) + " mb";
return (b / 1073741824).toFixed(2) + " gb";
}
function bar(val: number, max: number, len = 18) {
@@ -63,7 +63,7 @@
<div class="row">
<span class="key">mem</span>
<span class="bar">{bar(used, total)}</span>
<span class="val">{used} / {total} MB</span>
<span class="val">{used} / {total} mb</span>
</div>
<div class="row">
<span class="key">disk</span>
@@ -94,7 +94,7 @@
</section>
<section>
<div class="section-label">network</div>
<div class="section-label">network (since last boot)</div>
{#each network as iface}
<div class="row">
<span class="key">{iface.name}</span>
@@ -131,6 +131,7 @@
main {
padding: 3.5rem 4rem;
max-width: 640px;
text-transform: lowercase;
}
header {