From 67afe92195c24232f437700ee24ebb683c84a5ce Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 14 Aug 2022 11:01:09 +0100 Subject: [PATCH] Theme network page headers and add active network status --- core/templates/base.html | 5 +- .../manage/threshold/irc/network/network.html | 6 +- .../manage/threshold/irc/network/relays.html | 137 ++++++++++-------- .../threshold/irc/overview/networks.html | 42 ++++-- 4 files changed, 110 insertions(+), 80 deletions(-) diff --git a/core/templates/base.html b/core/templates/base.html index 002be11..e953ae4 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -81,15 +81,16 @@ transition: opacity 500ms ease-in; } .htmx-request .htmx-indicator{ - opacity:1 + opacity:1 } .htmx-request.htmx-indicator{ - opacity:1 + opacity:1 } .dropdown-content { height: 20em; overflow: auto; } + /* @media screen and (min-width: 500px) { .datetimepicker-wrapper { position: absolute; diff --git a/core/templates/manage/threshold/irc/network/network.html b/core/templates/manage/threshold/irc/network/network.html index 434ab5d..6882c27 100644 --- a/core/templates/manage/threshold/irc/network/network.html +++ b/core/templates/manage/threshold/irc/network/network.html @@ -5,7 +5,7 @@ style="display: none;" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-get="{% url 'threshold_irc_network_info' net %}" - hx-trigger="load, every 5s" + hx-trigger="load, every 60s" hx-target="#info" hx-swap="outerHTML"> @@ -14,7 +14,7 @@ style="display: none;" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-get="{% url 'threshold_irc_network_relays' net %}" - hx-trigger="load, every 5s" + hx-trigger="load, every 60s" hx-target="#relays" hx-swap="outerHTML"> @@ -23,7 +23,7 @@ style="display: none;" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-get="{% url 'threshold_irc_network_channels' net %}" - hx-trigger="load, every 5s" + hx-trigger="load, every 60s" hx-target="#channels" hx-swap="outerHTML"> diff --git a/core/templates/manage/threshold/irc/network/relays.html b/core/templates/manage/threshold/irc/network/relays.html index e75066b..84d3d88 100644 --- a/core/templates/manage/threshold/irc/network/relays.html +++ b/core/templates/manage/threshold/irc/network/relays.html @@ -7,23 +7,39 @@ - - - - + + + + @@ -84,71 +100,68 @@ {{ relay.nick }} {% endfor %} diff --git a/core/templates/manage/threshold/irc/overview/networks.html b/core/templates/manage/threshold/irc/overview/networks.html index cb737ca..9d9febc 100644 --- a/core/templates/manage/threshold/irc/overview/networks.html +++ b/core/templates/manage/threshold/irc/overview/networks.html @@ -4,15 +4,28 @@
idregaucoon - + + + + + + + + + + + + + + + + + - + nick - + -
-
-
- {% if relay.enabled %} - - {% else %} - - {% endif %} -
- - -
- -
+
+ {% endif %} + + + + +
+ +
- + + - + @@ -22,21 +35,24 @@ +
netrelays - + + + + + + + + + records - + + + + + {{ key }} - - - + {{ net.relays }} - - - + {% if net.active %} + + + + {% else %} + + + + {% endif %} + {{ net.channels }} - - - {{ net.records }}