summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-13 15:43:35 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-13 16:32:10 +0200
commit6c68284cb102971f05de030e7b428d742f17667b (patch)
tree862b2726e6e273742bd52c69a813c87c01310dec /ogcp
parent7cb006d5521d95cfe1c4b0768b2c99e25c82850b (diff)
js: only add MAC to client pills1.1.3-19
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.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/static/js/ogcp.js4
-rw-r--r--ogcp/templates/base.html2
2 files changed, 4 insertions, 2 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index 8f27bb7..b23c6e0 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -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;
}
diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html
index eb366ff..f43f4bd 100644
--- a/ogcp/templates/base.html
+++ b/ogcp/templates/base.html
@@ -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