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
master
Javier Hernandez 2023-12-13 12:43:41 +01:00 committed by OpenGnSys Support Team
parent 609ff0e19e
commit 131404dfd7
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}