js: only add MAC to client pills

Ignore any room, center or folder as they don't have a MAC address.
Trying to get the MAC of an scope element without one leads to a
JS exception.
master 1.1.3-19
Alejandro Sirgo Rica 2024-05-13 15:43:35 +02:00
parent 7cb006d552
commit 6c68284cb1
2 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,9 @@ function showSelectedClient(client_checkbox) {
$(container).append('<div class="badge badge-pill og-pill badge-light" ' +
'id="'+ pill_id + '">' + client_name +
'<br>' + client_checkbox.value + '</div>');
show_client_mac(pill_id);
if (client_name !== 'scope-room' && client_name !== 'scope-center' && client_name !== 'folder') {
show_client_mac(pill_id);
}
}
return;
}

View File

@ -111,7 +111,7 @@
<!-- ChartJS -->
<script src="{{ url_for('static', filename='AdminLTE/plugins/chart.js/Chart.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/ogcp.js') }}?v=5"></script>
<script src="{{ url_for('static', filename='js/ogcp.js') }}?v=6"></script>
<script>
// error messages