diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-17 09:27:54 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-17 09:35:05 +0200 |
commit | a637a958b005cfdcfe2b9327e32e51aa23bd30f7 (patch) | |
tree | fec690588d4e073c2d6a5ca1acea67cb8983e6f3 /ogcp/templates/actions/oglive.html | |
parent | c26b96e0b005fdebf4be9adc209679b83a3c2608 (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/templates/actions/oglive.html')
-rw-r--r-- | ogcp/templates/actions/oglive.html | 19 |
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 %} |