From f12048e973b988115b76bdbfe5cf7c8176a1db64 Mon Sep 17 00:00:00 2001 From: Michael Reber Date: Sat, 19 Jul 2025 11:19:40 +0200 Subject: [PATCH] reorder and add some comments --- pkg/web/templates/index.html | 98 ++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/pkg/web/templates/index.html b/pkg/web/templates/index.html index 200c06f..0667a27 100644 --- a/pkg/web/templates/index.html +++ b/pkg/web/templates/index.html @@ -140,12 +140,23 @@ +
-
+
- + +
+
+ Fail2ban configuration changed! To apply the changes, please: + +
+
+ + + + - + - -
-
- Fail2ban configuration changed! To apply the changes, please: - -
-
- + + +

Dashboard

@@ -208,42 +213,50 @@
-
+
+ - + + + + + - + + + +
@@ -586,6 +586,10 @@ + + + + + @@ -654,9 +659,9 @@ // For information: We avoid ES6 backticks in our JS, to prevent confusion with the Go template parser. "use strict"; - //******************************************************************* - //* Init page and main-components : * - //******************************************************************* + // ******************************************************************* + // * Init page and main-components : * + // ******************************************************************* showLoading(true); var currentJailForConfig = null; @@ -670,6 +675,12 @@ getTranslationsSettingsOnPageload(); }); }); + // ******************************************************************* + + + // ******************************************************************* + // * Global JavaScript Functions * + // ******************************************************************* // Toggle the loading overlay (with !important) function showLoading(show) { @@ -781,14 +792,15 @@ function closeModal(modalId) { document.getElementById(modalId).classList.add('hidden'); } - // Open modal function openModal(modalId) { document.getElementById(modalId).classList.remove('hidden'); } + // ******************************************************************* + //******************************************************************* - //* Fetch data and render dashboard : * + //* Fetch data and render dashboard functions * //******************************************************************* // Fetch summary (jails, stats, last bans)