From b1870d40e8ab18aa46339aa0955877406115e57a Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 27 Sep 2022 12:04:54 +0200 Subject: [PATCH] Apply functionality to openvpn log --- app/js/custom.js | 8 ++++++++ templates/openvpn/logging.php | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index e0ede530..6483614b 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -136,6 +136,14 @@ $(document).on("click", "#js-cleardnsmasq-log", function(e) { }); }); +$(document).on("click", "#js-clearopenvpn-log", function(e) { + $.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/openvpn.log'},function(data){ + jsonData = JSON.parse(data); + $("#openvpn-log").val(""); + }); +}); + + // Enable Bootstrap tooltips $(function () { $('[data-toggle="tooltip"]').tooltip() diff --git a/templates/openvpn/logging.php b/templates/openvpn/logging.php index 0aef4217..3d74b0e5 100644 --- a/templates/openvpn/logging.php +++ b/templates/openvpn/logging.php @@ -5,11 +5,12 @@
aria-describedby="log-openvpn"> - + + " />
- +