From fa30a8c1e4ec76e4fe157239632b110f0c6798d1 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 23 Mar 2023 19:46:00 +0100 Subject: [PATCH] Lobby: Dashboard - fix openvpn status reference --- src/www/widgets/include/openvpn.inc | 2 +- src/www/widgets/widgets/openvpn.widget.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/www/widgets/include/openvpn.inc b/src/www/widgets/include/openvpn.inc index 161ee08e7..d6334502c 100644 --- a/src/www/widgets/include/openvpn.inc +++ b/src/www/widgets/include/openvpn.inc @@ -1,4 +1,4 @@ &$ovpncfg) { // link kill buttons $(".act_kill_client").click(function(event){ event.preventDefault(); - var port = $(this).data("client-port"); - var ip = $(this).data("client-ip"); - $.post('/status_openvpn.php', {action: 'kill', port:port, remipp:ip}, function(data) { + let params = {server_id: $(this).data("client-port"), session_id: $(this).data("client-ip")}; + $.post('/api/openvpn/service/kill_session/', params, function(data, status){ location.reload(); }); }); @@ -77,7 +76,7 @@ foreach ($openvpn_cfg as $section => &$ovpncfg) {

- '>