<%- include("../partials/page-header", { user, title: "Datenbankverwaltung", subtitle: "", showUserName: true }) %>
<%- include("../partials/flash") %>
<%- include("../partials/admin-sidebar", { user, active: "database" }) %>

Datenbank Konfiguration

Hier kannst du die DB-Verbindung testen und speichern.

<% if (typeof testResult !== "undefined" && testResult) { %>
<%= testResult.message %>
<% } %>

Systeminformationen

<% if (typeof systemInfo !== "undefined" && systemInfo?.error) { %>
❌ Fehler beim Auslesen der Datenbankinfos:
<%= systemInfo.error %>
<% } else if (typeof systemInfo !== "undefined" && systemInfo) { %>
MySQL Version
<%= systemInfo.version %>
Anzahl Tabellen
<%= systemInfo.tableCount %>
Datenbankgröße
<%= systemInfo.dbSizeMB %> MB
<% if (systemInfo.tables && systemInfo.tables.length > 0) { %>
Tabellenübersicht
<% systemInfo.tables.forEach(t => { %> <% }) %>
Tabelle Zeilen Größe (MB)
<%= t.name %> <%= t.row_count %> <%= t.size_mb %>
<% } %> <% } else { %>
⚠️ Keine Systeminfos verfügbar (DB ist evtl. nicht konfiguriert oder Verbindung fehlgeschlagen).
<% } %>

Backup & Restore

<% if (typeof backupFiles === "undefined" || !backupFiles || backupFiles.length === 0) { %>
ℹ️ Noch keine Backups vorhanden.
<% } %>