From 6c68284cb102971f05de030e7b428d742f17667b Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 13 May 2024 15:43:35 +0200 Subject: 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. --- ogcp/static/js/ogcp.js | 4 +++- ogcp/templates/base.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ogcp') 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('
' + client_name + '
' + client_checkbox.value + '
'); - 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 @@ - +