Commit Graph

21 Commits

Author SHA1 Message Date
patrick 6f6e8555af Feature: ZFS Pool-Aktionen (Scrub, Resilver, Clear Errors) + Product-Spalte fix
- Backend: neue Endpoints POST /api/pools/{name}/clear und /resilver
- Frontend: Pool ⋮-Menü mit Scrub, Resilver, Clear Errors
- Product-Spalte im Status-Tab bricht jetzt korrekt um statt abgeschnitten zu werden

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 00:45:35 +02:00
patrick 1dc55b189b Fix: /zfs Seitenbreite auf max-w-7xl angepasst wie andere Seiten
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 00:41:03 +02:00
patrick 2c477cd5c9 Fix: file-sharing Seite crasht wenn parameters undefined
samba.parameters?.map() statt .map() direkt — API kann parameters
weglassen ohne einen Fehler zu werfen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 00:39:43 +02:00
patrick 8c12e1c73d Refactor: /datasets und /snapshots entfernt, neue /zfs-Seite nach Cockpit-Vorbild
- Neue Seite /zfs: Pools-Tabelle mit aufklappbaren Zeilen, Tabs File Systems / Snapshots / Status, vdev-Baum im Status-Tab
- /datasets und /snapshots gelöscht (Funktionalität konsolidiert)
- Header bereinigt: ZFS-Link ersetzt Datasets/Snapshots, navLink-Hilfsfunktion reduziert Redundanz

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 00:33:23 +02:00
patrick feda8a9477 Revert "Refactor: Shares-Funktionen in Datasets-Seite zusammengeführt"
This reverts commit 55a6c38e02.
2026-06-04 23:31:32 +02:00
patrick d5b87028c5 Refactor: Shares-Funktionen in Datasets-Seite zusammengeführt
- datasets/page.tsx: neuer Tab 'Shares & Config' mit vollem Inhalt aus
  shares/page.tsx (Samba, NFS, Samba Config mit MacOS-Toggle + Raw-Editor)
- shares/page.tsx: redirect -> /datasets
- Header.tsx: 'Shares'-Link zeigt auf /datasets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 23:28:21 +02:00
patrick 48dfd9e249 Cleanup: getPoolStats entfernt, nicht mehr verwendet
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 23:16:29 +02:00
patrick d4a05aabb3 Fix: ungenutzte stats-Variable entfernt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 23:15:35 +02:00
patrick e9384289e0 Fix: Usage-Prozent aus Pool-Capacity statt Dataset-Summe
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 23:11:29 +02:00
patrick a3939666c4 Fix: getPools gibt Pool[] zurück, kein Wrapper-Objekt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 23:08:17 +02:00
patrick 986b78d15b Fix: Pool-Größe aus zpool list statt aus Dataset-Summen
Size/Allocated/Free/Fragmentation kommen jetzt direkt aus den Pool-Daten
(zpool list) statt aus aufsummierten Dataset-Werten, die zu Doppelzählung
führten. Pools werden parallel zu Datasets geladen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 23:05:31 +02:00
patrick 9cc9844f0b Feature: Snapshot-Tab gruppiert nach Dataset wie Cockpit-Plugin
Snapshots werden nach Dataset gruppiert angezeigt (tank: 94, tank/share: 94)
mit aufklappbaren Zeilen statt flacher Liste.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 22:56:37 +02:00
patrick d079d76151 Feature: Snapshot-Tab in Datasets mit Kontextmenü (Clone/Rename/Rollback/Destroy)
- Snapshots direkt im Datasets-Tab ladbar (lazy, per Pool)
- Tabelle: Name, Created, Used, Referenced, Clones
- Kontextmenü (⋮) mit Clone, Rename, Roll Back, Destroy Snapshot
- Backend: /api/snapshots/clone + /api/snapshots/rename Endpoints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 22:51:08 +02:00
patrick 09db060281 Feature: MacOS-Toggle + Raw-Editor im Samba Config-Tab
- Toggle 'Global MacOS Shares' setzt/entfernt fruit-Parameter automatisch
  (fruit:encoding=native, fruit:metadata=stream, fruit:zero_file_id=yes,
  fruit:nfs_aces=no) via net conf setparm
- Raw-Textarea zeigt alle globalen Parameter direkt editierbar (key = value)
- Tabellen-Ansicht durch Raw-Editor ersetzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 22:34:07 +02:00
patrick ab75f462cc Fix: Snapshots-Tabelle leer - Top-Level-Datasets initial expandiert
Sub-Datasets (tank/share) waren initial eingeklappt, dadurch waren
alle Zeilen unsichtbar. Beim Laden werden jetzt alle Top-Level-Datasets
automatisch expandiert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 22:13:28 +02:00
patrick bce8de36aa Fix: Snapshot-Datum 'Invalid Date' - Feld created statt creation
Backend liefert das Snapshot-Erstellungsdatum als 'created' (Unix-Timestamp),
das Frontend-Interface/Rendering erwartete aber 'creation'. Feld angeglichen
und creation_datetime im Interface ergänzt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 21:31:57 +02:00
patrick a187b625bc Fix: Identities Group Management - bessere Fehlermeldungen
- add_user_to_group: Exception werfen mit stderr Nachricht
- remove_user_from_group: Exception werfen mit stderr Nachricht
- text=True für subprocess für besseres Error Handling
- Router aktualisiert um Fehlermeldungen an Frontend weiterzugeben
- Benutzer sehen jetzt detaillierte Fehlermeldungen beim Gruppe-Entfernen

Behebt: 'Failed to remove user from group' verschluckt die echte Fehlermeldung

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick 83375ceef1 Update /file-sharing page to support new Samba parameters
Features:
- Display Samba config in key=value format
- Support adding new parameters (one per line)
- Parse and apply changes via net conf setparm
- Comments (# and ;) are ignored
- Auto-reload after save to show applied changes

Format: key = value (one per line)

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:35:28 +02:00
patrick 55ae3b79ae Add editable Samba global configuration with net conf setparm
Backend:
- Use 'net conf setparm' to update individual parameters
- Accept dictionary of key-value pairs in API

Frontend:
- Add Edit/Cancel/Save buttons to Samba Config tab
- Inline editing of configuration values
- Save changes back to registry

Changes are applied immediately via net conf setparm.

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:31:14 +02:00
patrick eec74626d0 Improve Samba Global Configuration display in WebUI
Backend:
- Parse global config into structured key-value pairs
- Return parameters array instead of raw text
- Better handling of comments and empty lines

Frontend:
- Add 'Samba Config' tab to shares page
- Display config parameters in readable table format
- Color-code parameter names for clarity
- Add getSambaConfig() method to API client

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:01:58 +02:00
Claude Code 6d74d874b6 ZMB Webui: Complete Project – Rebrand & Initial Clean Commit
ARCHITECTURE
============
Backend: FastAPI + uvicorn (port 8000)
  - JWT authentication with PAM system users
  - ZFS CLI wrapper with caching (30-60s TTL)
  - WebSocket pool status broadcaster (30s interval)
  - Services: auth, zfs_runner, file_manager, shares, identities, system_info
  - Routers: pools, datasets, snapshots, shares, identities, navigator, system

Frontend: Next.js 15 + TypeScript (static export)
  - Incremental Static Regeneration (ISR) for weak hardware
  - Type-safe API client (lib/api.ts)
  - Dark mode + custom Tailwind theme
  - Pages: Dashboard, Login, Snapshots, Datasets, Shares, etc.

DEPLOYMENT
==========
Test Target: 192.168.1.179:8090 (Debian LXC)
Production: 10.66.120.3:9090 (Raspberry Pi 4GB ARM64)
Updater: Automated Gitea-based deployment (update-test.sh, update-pi.sh)

FEATURES COMPLETED
==================
Phase 3a: Dashboard Quick Stats (System, CPU, Memory, Storage)
  - Real-time stats with color-coded progress bars
  - Responsive grid layout (mobile: 1, tablet: 2, desktop: 4 columns)
  - ISR-optimized for fast loads on weak hardware

REBRANDING
==========
Renamed throughout:
  - Project: 'ZFS Manager' → 'ZMB Webui'
  - Services: 'zfs-manager' → 'zmb-webui'
  - Systemd units: zfs-manager-backend → zmb-webui-backend
  - Configuration files and documentation

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 00:43:05 +02:00