summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-12-13 12:43:41 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-13 13:25:29 +0100
commit131404dfd741846d304ac2c1d5c4204a1145384b (patch)
tree82cfe5d4dd9bc82964e52185e6b70957efc8720a
parent609ff0e19ece42b68ff80a3eb14086690bd35c25 (diff)
ogcp.js: Remove id part from client bubbles
Bubbles depicting clients were previously displaying in the format <client_name>_<client_id>. This commit changes that to only display the name
-rw-r--r--ogcp/static/js/ogcp.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index 3c53035..5259ea1 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -23,8 +23,9 @@ function showSelectedClient(client_checkbox) {
if (client_checkbox.checked) {
if (!($('#' + pill_id).length)) {
+ const client_name = client_checkbox.name.replaceAll(/_\d+$/g, '');
$(container).append('<div class="badge badge-pill og-pill badge-light" ' +
- 'id="'+ pill_id + '">' + client_checkbox.name +
+ 'id="'+ pill_id + '">' + client_name +
'<br>' + client_checkbox.value + '</div>');
show_client_mac(pill_id);
}