From 4eaff5a9b169d78841bbb09ef38626063100dbfe Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 31 Jan 2025 00:49:57 +0100 Subject: [PATCH] Fixes file views and downloads. --- app.py | 1 - templates/download_results.html | 51 +++++++++++++++++++++++++++------ templates/index.html | 17 +++++++---- 3 files changed, 54 insertions(+), 15 deletions(-) diff --git a/app.py b/app.py index b374eaa..cd0d08a 100644 --- a/app.py +++ b/app.py @@ -246,7 +246,6 @@ def get_size(path): elif size < pow(1024,4): return f"{round(size/(pow(1024,3)), 2)} GB" - @app.route('/data/') def download_data_file(filename): return send_from_directory('data', filename) diff --git a/templates/download_results.html b/templates/download_results.html index 43453f8..1ad0114 100644 --- a/templates/download_results.html +++ b/templates/download_results.html @@ -25,22 +25,55 @@
-

Available Files

- +

Data

+
- - + + + + + + + + {% for file in files.data %} + + + + + + + + {% endfor %} + +
DataLogsFile NameLast ModifiedCreatedSizeAction
{{ file.name }}{{ file.last_modified | datetimeformat }}{{ file.created | datetimeformat }}{{ file.size }} + +
+

Log

+ + + + + + + + - {% for file in files %} - - - - + {% for file in files.log %} + + + + + + + {% endfor %} +
File NameLast ModifiedCreatedSizeAction
{{ file }}{{ file }}
{{ file.name }}{{ file.last_modified | datetimeformat }}{{ file.created | datetimeformat }}{{ file.size }} + +
diff --git a/templates/index.html b/templates/index.html index be09d44..4dea356 100644 --- a/templates/index.html +++ b/templates/index.html @@ -48,11 +48,18 @@
-
-

Logs

- - -
+
+
+
+

Logs

+ + +
+
+
+

Stats

+
+