// Speicher und Statistik in der Übersicht (5.5.0, Commander: „Ist mir zu // leer … wie viel Speicher noch auf dem Server oder auf dem Arbeitsordner // frei ist"). Gemessen im Kern mit fs.statfs — lokal wie auf der Freigabe. import type { SpeicherPlatz, SpeicherStand, Statistik } from '../../gemeinsam/nachrichten' import { FuellBalken, dauerGrob, gbKurz } from '../bausteine' import { speicherLaden } from '../kernverbindung' /** Ab hier wird gewarnt: eine Blu-ray braucht rund 50 GB (Roh + Kompression). */ export const WENIG_FREI_BYTES = 60e9 export const SEHR_WENIG_FREI_BYTES = 20e9 function Platz({ name, platz, hinweis }: { name: string; platz: SpeicherPlatz; hinweis: string }) { const ton = !platz.ok ? 'rot' : platz.freiBytes < SEHR_WENIG_FREI_BYTES ? 'rot' : platz.freiBytes < WENIG_FREI_BYTES ? 'warn' : 'gold' const belegt = platz.ok && platz.gesamtBytes > 0 ? 1 - platz.freiBytes / platz.gesamtBytes : 0 return (
{platz.pfad} {platz.ok && ` · ${gbKurz(platz.gesamtBytes)} gesamt`} {!platz.ok && platz.fehler.length > 0 && ` · ${platz.fehler}`}
wird gemessen …
) : (