summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-17 09:27:54 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-17 09:35:05 +0200
commita637a958b005cfdcfe2b9327e32e51aa23bd30f7 (patch)
treefec690588d4e073c2d6a5ca1acea67cb8983e6f3 /ogcp
parentc26b96e0b005fdebf4be9adc209679b83a3c2608 (diff)
templates: show oglive in client pills
Add oglive to each client pill in action/oglive using js. This makes easier to have a global perspective of the client's configuration.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/templates/actions/oglive.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/ogcp/templates/actions/oglive.html b/ogcp/templates/actions/oglive.html
index 81b70dd..6cfc523 100644
--- a/ogcp/templates/actions/oglive.html
+++ b/ogcp/templates/actions/oglive.html
@@ -48,4 +48,23 @@
button_map={'ok': 'primary'},
extra_classes="m-5") }}
+
+<!-- jQuery -->
+<script src="{{ url_for('static', filename='AdminLTE/plugins/jquery/jquery.min.js') }}"></script>
+<script>
+ var ogLivesSet = {{ oglives_set|tojson|safe }};
+ // Update pill data
+ $('.badge-pill').each(function(index) {
+ for (const ogLive in ogLivesSet) {
+ for (const clientName of ogLivesSet[ogLive]) {
+ if ($(this).html().includes(clientName)) {
+ $(this).html($(this).html() + '<br>' + ogLive);
+ break;
+ }
+ }
+ }
+ });
+</script>
+
+
{% endblock %}