From 5035dd49471a2e189da2800b1cb682b6424faf15 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 4 Jan 2023 09:52:15 +0100 Subject: [PATCH] fixed refreshing data after deleting some origin or lease --- app/static/assets/js/helper.js | 1 - app/templates/views/dashboard_leases.html | 20 +++++++------ app/templates/views/dashboard_origins.html | 35 ++++++++++++++-------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/app/static/assets/js/helper.js b/app/static/assets/js/helper.js index 28604d5..d383282 100644 --- a/app/static/assets/js/helper.js +++ b/app/static/assets/js/helper.js @@ -102,7 +102,6 @@ async function deleteOrigins() { let xhr = new XMLHttpRequest(); xhr.open("DELETE", '/-/origins', true); xhr.send(); - await fetchOriginsWithLeases() } async function deleteOrigin(origin_ref) { diff --git a/app/templates/views/dashboard_leases.html b/app/templates/views/dashboard_leases.html index 6d9d422..7e24e09 100644 --- a/app/templates/views/dashboard_leases.html +++ b/app/templates/views/dashboard_leases.html @@ -5,18 +5,20 @@ {% endblock %} {% block content %} -
-
-

Leases with origin

-
-
- +
+
+

Leases with origin

+
+
+ +
-
-
-
+
+
{% endblock %} {% block scripts %} diff --git a/app/templates/views/dashboard_origins.html b/app/templates/views/dashboard_origins.html index c45a0d0..b7142b3 100644 --- a/app/templates/views/dashboard_origins.html +++ b/app/templates/views/dashboard_origins.html @@ -5,24 +5,33 @@ {% endblock %} {% block content %} -
-
-

Origins with leases

-
-
- +
+
+

Origins with leases

+
+
+ + +
-
-
-
+
+
{% endblock %} {% block scripts %} {{ super() }} - + {% endblock %}