mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Added generateWgKey()
This commit is contained in:
parent
d871e271ef
commit
ad6a14fa50
@ -348,6 +348,19 @@ function updateBlocklist() {
|
|||||||
function clearBlocklistStatus() {
|
function clearBlocklistStatus() {
|
||||||
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
|
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handler for the wireguard generate key button
|
||||||
|
function generateWgKey() {
|
||||||
|
var entity = $('#wg-srvpubkey').attr('name');
|
||||||
|
console.log(entity);
|
||||||
|
$.post('ajax/networking/get_wgkey.php',{'entity':entity },function(data){
|
||||||
|
var jsonData = JSON.parse(data);
|
||||||
|
console.log(jsonData);
|
||||||
|
$('#wg-srvpubkey').val(jsonData);
|
||||||
|
$('#wg-srvpubkey-status').removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Static Array method
|
// Static Array method
|
||||||
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
|
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user