implemented button for delete all expired leases
This commit is contained in:
parent
8d236af289
commit
16271ad00b
@ -125,3 +125,9 @@ async function deleteLease(lease_ref) {
|
|||||||
xhr.open("DELETE", `/-/lease/${lease_ref}`, true);
|
xhr.open("DELETE", `/-/lease/${lease_ref}`, true);
|
||||||
xhr.send();
|
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())">
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteLease().finally(() => load())">
|
||||||
delete lease
|
delete lease
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteExpiredLeases().finally(() => load())">
|
||||||
|
delete all expired leases
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="load()" title="refresh">
|
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="load()" title="refresh">
|
||||||
|
Loading…
Reference in New Issue
Block a user