diff --git a/src/opnsense/www/js/widgets/OpenVPNClients.js b/src/opnsense/www/js/widgets/OpenVPNClients.js index b27bdbafd..ede19b07d 100644 --- a/src/opnsense/www/js/widgets/OpenVPNClients.js +++ b/src/opnsense/www/js/widgets/OpenVPNClients.js @@ -100,23 +100,23 @@ export default class OpenVPNClients extends BaseTableWidget { // sort the sessions per server server.clients.sort((a, b) => (b.bytes_received + b.bytes_sent) - (a.bytes_received + a.bytes_sent)); server.clients.forEach((client) => { - let color = "text-success"; + let color = "text-muted"; // disabled servers are not included in the list. Stopped servers have no "status" property if (client.status) { - // server active, status may either be 'ok' or 'failed' if (client.status === 'failed') { color = "text-danger"; } else { color = "text-success"; } - } else { - // server is stopped - color = "text-muted"; } + $clients.append($(`
- +   ${client.common_name} @@ -164,13 +164,16 @@ export default class OpenVPNClients extends BaseTableWidget { }); }; - - $('.ovpn-client-command').tooltip({container: 'body'}); } async onWidgetTick() { if (!this.locked) { + $('.ovpn-client-command').tooltip('hide'); + $('.ovpn-client-status').tooltip('hide'); await this.updateClients(); } + + $('.ovpn-client-command').tooltip({container: 'body'}); + $('.ovpn-client-status').tooltip({container: 'body'}); } }