From 9d48bbd28593ebe2eb128245d97801cb681a440e Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Fri, 14 Feb 2025 22:22:27 +1100 Subject: [PATCH] Refactor HTTP functions overview and logs pages with improved UI and responsiveness - Modernize the design of HTTP functions overview and logs pages - Add more detailed styling with Tailwind CSS - Improve layout and readability with better typography and spacing - Add empty state handling for both logs and functions lists - Enhance visual hierarchy and interaction states --- templates/dashboard/http_functions/logs.html | 98 ++++++--- .../dashboard/http_functions/overview.html | 207 +++++++++--------- 2 files changed, 170 insertions(+), 135 deletions(-) diff --git a/templates/dashboard/http_functions/logs.html b/templates/dashboard/http_functions/logs.html index 72ab1af..668fb39 100644 --- a/templates/dashboard/http_functions/logs.html +++ b/templates/dashboard/http_functions/logs.html @@ -11,47 +11,75 @@ show_history=True, edit_url=url_for('http_function_editor', function_id=function_id), cancel_url=url_for('dashboard_http_functions')) }} -
- - - - - +
+
+ +
+ + + + +
- - {% for invocation in http_function_invocations %} - -
- - {{ invocation.invocation_time.strftime('%Y-%m-%d %H:%M:%S') }} - - v{{ invocation.version_number }} - -
+ + {% for invocation in http_function_invocations %} +
+ +
+
+ + + + +
+
+ {{ invocation.invocation_time.strftime('%Y-%m-%d %H:%M:%S') + }} + + v{{ invocation.version_number }} + +
+
- -
- {{ invocation.request_data }} -
+ +
+
{{ invocation.request_data }}
+
- -
- {{ invocation.response_data }} -
+ +
+
{{ invocation.response_data }}
+
- -
- {% for log in invocation.logs %} -
{{ log[0] }}
+ +
+ {% for log in invocation.logs %} +
{{ log[0] }}
+ {% endfor %} + {% if not invocation.logs %} +
No logs available
+ {% endif %} +
+
{% endfor %} + + {% if not http_function_invocations %} +
+
+ + + +
+

No logs found

+

No function invocations have been recorded yet.

+
+ {% endif %}
- {% endfor %}
{% endblock %} \ No newline at end of file diff --git a/templates/dashboard/http_functions/overview.html b/templates/dashboard/http_functions/overview.html index 483e56c..b47df0e 100644 --- a/templates/dashboard/http_functions/overview.html +++ b/templates/dashboard/http_functions/overview.html @@ -2,110 +2,117 @@ {% block page %} -
-

HTTP functions

- -
-
-
- - - - - - - - - - {% for function in http_functions %} - - - - + + + {% endif %} + +
NameActions
- {{ function.name }} - - #{{ function.invoked_count }} - - - v{{ function.version_number }} - - {% if function.is_public %} - - - - +
+
+

HTTP Functions

+ +
- - {% endif %} - -
-
- -
+

No functions found

+
+