mirror of https://git.48k.eu/ogcp
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.master
parent
c26b96e0b0
commit
a637a958b0
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue