+
+ Speicherverbrauch
+
+ {storageLoading ? (
+
Lade Speicherdaten...
+ ) : storageData.length === 0 ? (
+
Keine Speicherdaten verfügbar
+ ) : (
+
+ {storageData.map((sv) => {
+ const usedLabel = formatBinaryDataSizeFromMebibytes(sv.usedMB);
+ const maxLabel = sv.maxDataVolumeMB != null
+ ? formatBinaryDataSizeFromMebibytes(sv.maxDataVolumeMB)
+ : 'unbegrenzt';
+ const pct = sv.percentUsed ?? 0;
+ const barColor = pct >= 90
+ ? 'var(--color-error, #ef4444)'
+ : pct >= 70
+ ? 'var(--color-warning, #f59e0b)'
+ : 'var(--primary-color, #3b82f6)';
+
+ return (
+
+
+
+ {sv.mandateName}
+
+
+ {usedLabel} / {maxLabel}
+ {sv.percentUsed != null && (
+
+ ({pct.toFixed(1)}%)
+
+ )}
+
+
+ {sv.maxDataVolumeMB != null && (
+
+
0 ? '4px' : '0',
+ }} />
+
+ )}
+
+ Dateien: {formatBinaryDataSizeFromMebibytes(sv.filesMB)}
+ RAG-Index: {formatBinaryDataSizeFromMebibytes(sv.ragIndexMB)}
+
+
+ );
+ })}
+
+ )}
+
+
+
+ {/* AI usage statistics */}
+
+ >
)}
{/* ================================================================ */}
diff --git a/src/pages/views/workspace/NeutralizationPanel.tsx b/src/pages/views/workspace/NeutralizationPanel.tsx
index bcb0231..22a5812 100644
--- a/src/pages/views/workspace/NeutralizationPanel.tsx
+++ b/src/pages/views/workspace/NeutralizationPanel.tsx
@@ -32,8 +32,9 @@ const NeutralizationPanel: React.FC
= ({ instanceId })
setLoading(true);
try {
const response = await api.get(`/api/workspace/${instanceId}/files`);
- const files = response.data?.data || response.data || [];
- const neutralized = files
+ const raw = response.data;
+ const files = Array.isArray(raw) ? raw : (raw?.files || raw?.data || []);
+ const neutralized = (Array.isArray(files) ? files : [])
.filter((f: any) => f.neutralize)
.map((f: any) => ({
fileId: f.id,