From 9e184516e68ebfbecd3ca04ccd4e2d9467ae159a Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 17 Aug 2023 08:50:19 +0200 Subject: [PATCH] action-list.js: Use `getAttribute` to get `href` - `.href` returns the whole url with `http(s)`. --- public/js/action-list.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/action-list.js b/public/js/action-list.js index afa26192b..5eaf0a4ad 100644 --- a/public/js/action-list.js +++ b/public/js/action-list.js @@ -118,7 +118,7 @@ _this.setActive(toActiveItems); _this.addSelectionCountToFooter(list); _this.setLastActivatedItemUrl(lastActivatedUrl); - _this.loadDetailUrl(list, target.matches('a') ? target.href : null); + _this.loadDetailUrl(list, target.matches('a') ? target.getAttribute('href') : null); } /** @@ -418,7 +418,7 @@ url = this.createMultiSelectUrl(activeItems); } else { let anchor = activeItems[0].querySelector('[href]'); - url = anchor ? anchor.href : null; + url = anchor ? anchor.getAttribute('href') : null; } } @@ -577,7 +577,7 @@ anchor.innerText = label + dots; }, null, 250); - let url = anchor.href; + let url = anchor.getAttribute('href'); let req = this.icinga.loader.loadUrl( // Add showCompact, we don't want controls in paged results this.icinga.utils.addUrlFlag(url, 'showCompact'),