From c3b8874f3c2fa12db6ca9840c7494b47f0439098 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Tue, 8 Jul 2025 17:41:57 +0200 Subject: [PATCH] Add used_space --- www/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/index.php b/www/index.php index bddbf60..78db7c7 100644 --- a/www/index.php +++ b/www/index.php @@ -159,7 +159,8 @@ foreach ($clients as $c) { } header('Content-Type: application/json; charset=UTF-8'); - echo "{\"data\": [\n"; + $size = intval(exec("du -s .data/$c")) * 1024; + echo "{\"used_space\": $size, \"data\": [\n"; $first = true; foreach (scandir(".data/$c/") as $file) { if (str_starts_with($file, ".") || str_ends_with($file, ".php") || str_ends_with($file, ".inc")) continue;