From f0bed51b663e15f26550af377cc257c434f8a241 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Mon, 24 Nov 2025 09:08:10 +1100 Subject: [PATCH] Fix http overview template --- .../dashboard/http_functions/overview.html | 82 ++++++++++++++----- 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/templates/dashboard/http_functions/overview.html b/templates/dashboard/http_functions/overview.html index a27b106..27af737 100644 --- a/templates/dashboard/http_functions/overview.html +++ b/templates/dashboard/http_functions/overview.html @@ -1,25 +1,69 @@ -const isExpanding = btn.textContent.trim() === 'Expand All'; +{% extends 'dashboard.html' %} -details.forEach(detail => { -if (isExpanding) { -detail.setAttribute('open', ''); -} else { -detail.removeAttribute('open'); -} -}); +{% block page %} -btn.textContent = isExpanding ? 'Collapse All' : 'Expand All'; -} +{% import 'dashboard/http_functions/_function_list.html' as list_macros %} -// Reset button state when HTMX updates the list -document.body.addEventListener('htmx:afterSwap', function (evt) { -if (evt.detail.target.id === 'function-list') { -const btn = document.getElementById('toggle-btn'); -if (btn) { -btn.textContent = 'Expand All'; -} -} -}); +
+
+

HTTP Functions

+
+ + +
+
+ +
+ {% if http_functions %} + {{ list_macros.render_functions(http_functions) }} + {% else %} +
+

No functions found

+

Click the "Add Function" button to create your + first function

+
+ {% endif %} +
+
+ + {% endblock %} \ No newline at end of file