homelab: Plattenschwellen 80/90 % statt 85/95 % (ext4 haelt 5 % fuer root zurueck; AdGuard war bei 94 % innen voll)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-09-24 21:04:05 +02:00
co-authored by Claude Opus 5.5
parent c08a144006
commit 6a5134ef79
20 changed files with 24 additions and 24 deletions
@@ -42,7 +42,7 @@ function SystemText({ b }: { b: BausteinStand }) {
)
}
/** Belegung der Platte: ruhig bis 85 %, dann bernstein, ab 95 % rot. */
/** Belegung der Platte: ruhig bis 80 %, dann bernstein, ab 90 % rot. */
function PlatteZelle({ ziel }: { ziel: ZielStand }) {
const anteil = plattenAnteil(ziel)
if (anteil === null) return <span className="text-text-3">–</span>
@@ -81,7 +81,7 @@ describe("GeraeteListe", () => {
expect(start).toHaveBeenCalledWith(suchen)
})
it("zeigt die Belegung der Platte und sagt „voll“ ab 95 %", () => {
it("zeigt die Belegung der Platte und sagt „voll“ ab 90 %", () => {
render(<GeraeteListe ziele={[{ ...netbird, platte: { belegt: 1_960_000_000, gesamt: 2_000_000_000 } }]}
laufend={new Map()} gesperrt={false} onAktion={() => {}} />)
expect(screen.getByText("98 % voll")).toHaveAttribute("title", "2,0 von 2,0 GB belegt")
+1 -1
View File
@@ -55,7 +55,7 @@ describe("lampeFuer", () => {
it("warnt bei voller Platte vor allem anderen außer Stille", () => {
expect(lampeFuer({ ...netbird, platte: { belegt: 98, gesamt: 100 } }, true)).toMatchObject({ zustand: "fehler", wert: "Platte voll" })
expect(lampeFuer({ ...npm, platte: { belegt: 90, gesamt: 100 } }, false)).toMatchObject({ zustand: "warn", wert: "Platte 90 %" })
expect(lampeFuer({ ...npm, platte: { belegt: 85, gesamt: 100 } }, false)).toMatchObject({ zustand: "warn", wert: "Platte 85 %" })
expect(lampeFuer({ ...npm, platte: { belegt: 50, gesamt: 100 } }, false).zustand).toBe("ok")
})
+3 -3
View File
@@ -81,14 +81,14 @@ export function neuText(b: BausteinStand): string {
return b.kurz || b.verfuegbar || "neu"
}
/** Anteil der belegten Platte (0…1) oder null, wo unbekannt. Ab 85 % gelb, ab 95 % rot — wie der Wächter. */
/** Anteil der belegten Platte (0…1) oder null, wo unbekannt. Ab 80 % gelb, ab 90 % rot — wie der Wächter (ext4 hält 5 % zurück). */
export function plattenAnteil(ziel: ZielStand): number | null {
const p = ziel.platte
return p && p.gesamt > 0 ? p.belegt / p.gesamt : null
}
export const PLATTE_GELB = 0.85
export const PLATTE_ROT = 0.95
export const PLATTE_GELB = 0.8
export const PLATTE_ROT = 0.9
export function lampeFuer(ziel: ZielStand, laeuft: boolean): Lampe {
const label = kurzname(ziel)