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:
0xCA 2023-11-05 23:45:12 +05:00
parent 92333a08d8
commit 53eaab0079
5 changed files with 134 additions and 16 deletions

View file

@ -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