mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2024-11-23 15:31:00 +03:00
implemented button for delete all expired leases
This commit is contained in:
parent
77dd0922d8
commit
0e39f1849b
@ -125,3 +125,9 @@ async function deleteLease(lease_ref) {
|
||||
xhr.open("DELETE", `/-/lease/${lease_ref}`, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
async function deleteExpiredLeases() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("DELETE", `/-/leases/expired`, true);
|
||||
xhr.send();
|
||||
}
|
||||
|
@ -13,6 +13,9 @@
|
||||
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteLease().finally(() => load())">
|
||||
delete lease
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteExpiredLeases().finally(() => load())">
|
||||
delete all expired leases
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="load()" title="refresh">
|
||||
|
Loading…
Reference in New Issue
Block a user