mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
Apply functionality to openvpn log
This commit is contained in:
parent
5d0454f96e
commit
b1870d40e8
2 changed files with 11 additions and 2 deletions
|
@ -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
|
// Enable Bootstrap tooltips
|
||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input class="custom-control-input" id="log-openvpn" type="checkbox" name="log-openvpn" value="1" <?php echo $logEnable ? ' checked="checked"' : "" ?> aria-describedby="log-openvpn">
|
<input class="custom-control-input" id="log-openvpn" type="checkbox" name="log-openvpn" value="1" <?php echo $logEnable ? ' checked="checked"' : "" ?> aria-describedby="log-openvpn">
|
||||||
<label class="custom-control-label" for="log-openvpn"><?php echo _("Enable logging") ?></label>
|
<label class="custom-control-label align-middle" for="log-openvpn"><?php echo _("Enable logging") ?></label>
|
||||||
|
<input type="button" class="btn btn-outline btn-warning btn-sm align-top ml-2" id="js-clearopenvpn-log" value="<?php echo _("Clear log"); ?>" />
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-8 mt-2">
|
<div class="form-group col-md-8 mt-2">
|
||||||
<textarea class="logoutput"><?php echo htmlspecialchars($logOutput, ENT_QUOTES); ?></textarea>
|
<textarea class="logoutput" id="openvpn-log"><?php echo htmlspecialchars($logOutput, ENT_QUOTES); ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.tab-pane -->
|
</div><!-- /.tab-pane -->
|
||||||
|
|
Loading…
Reference in a new issue