Skip to content

Commit

Permalink
action-list.js: Use getAttribute to get href
Browse files Browse the repository at this point in the history
- `.href` returns the whole url with `http(s)`.
  • Loading branch information
sukhwinder33445 authored and nilmerg committed Aug 21, 2023
1 parent 3aedcca commit 2eaf1e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/js/action-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 2eaf1e6

Please sign in to comment.