mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-25 19:54:06 +03:00
Full implementation of subnet ranges for a new client, fixes
fix: free ip search was stopping after no free ip on the first interface fix: toast obstructing the buttons fix: stuck apply config button
This commit is contained in:
parent
92333a08d8
commit
53eaab0079
5 changed files with 134 additions and 16 deletions
|
@ -260,6 +260,25 @@ Wireguard Clients
|
|||
const divElement = document.getElementById("paused_" + clientID);
|
||||
divElement.style.visibility = "visible";
|
||||
}
|
||||
|
||||
function updateSubnetRangesList() {
|
||||
$.getJSON("{{.basePath}}/api/subnet-ranges", null, function(data) {
|
||||
console.log(data);
|
||||
$("#subnet_ranges option").remove();
|
||||
$("#subnet_ranges").append(
|
||||
$("<option></option>")
|
||||
.text("Any")
|
||||
.val("__default_any__")
|
||||
);
|
||||
$.each(data, function(index, item) {
|
||||
$("#subnet_ranges").append(
|
||||
$("<option></option>")
|
||||
.text(item)
|
||||
.val(item)
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// load client list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue