From d79443953730388ffee528c4185e695731e5e643 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 6 Jul 2023 10:02:21 +0200 Subject: [PATCH] ui.js: Update browser address bar url when container closes `stopPendingRequestsFor()` cancel the pending request but push the canceled url to history (by calling `loader::OnFailure` internally). Now the `icingaUrl` is set again, remove it and push again the current state to history. --- public/js/icinga/ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index 5dc2919f6..0e6ee82ce 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -342,6 +342,7 @@ }, closeContainer: function($c) { + this.icinga.loader.stopPendingRequestsFor($c); $c.removeData('icingaUrl'); $c.removeData('icingaTitle'); $c.removeData('icingaRefresh'); @@ -349,8 +350,8 @@ $c.removeData('icingaModule'); delete $c[0].dataset.icingaContainerId; $c.removeAttr('class').attr('class', 'container'); - this.icinga.loader.stopPendingRequestsFor($c); $c.trigger('close-column'); + this.icinga.history.pushCurrentState(); $c.html(''); },