mirror of https://git.48k.eu/ogcp
templates: show boot mode in client pills
Add boot mode to each client pill in action/mode using js. This makes easier to have a global perspective of the client's configuration.master
parent
b0858a7a62
commit
26785aa88b
|
@ -49,4 +49,22 @@
|
|||
button_map={'ok': 'primary'},
|
||||
extra_classes="m-5") }}
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="{{ url_for('static', filename='AdminLTE/plugins/jquery/jquery.min.js') }}"></script>
|
||||
<script>
|
||||
var modesSet = {{ modes_set|tojson|safe }};
|
||||
// Update pill data
|
||||
$('.badge-pill').each(function(index) {
|
||||
for (const mode in modesSet) {
|
||||
for (const clientName of modesSet[mode]) {
|
||||
console.log(mode, clientName, $(this).html())
|
||||
if ($(this).html().includes(clientName)) {
|
||||
$(this).html($(this).html() + '<br>mode: ' + mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue