From 16271ad00bd87360e11ad05546bda6db4c8ec378 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 12 Jun 2023 11:41:01 +0200 Subject: [PATCH] implemented button for delete all expired leases --- app/static/assets/js/helper.js | 6 ++++++ app/templates/views/dashboard_leases.html | 3 +++ 2 files changed, 9 insertions(+) diff --git a/app/static/assets/js/helper.js b/app/static/assets/js/helper.js index 957f860..2f40de4 100644 --- a/app/static/assets/js/helper.js +++ b/app/static/assets/js/helper.js @@ -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(); +} diff --git a/app/templates/views/dashboard_leases.html b/app/templates/views/dashboard_leases.html index 54ada93..58896fc 100644 --- a/app/templates/views/dashboard_leases.html +++ b/app/templates/views/dashboard_leases.html @@ -13,6 +13,9 @@ +