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 committed Aug 17, 2023
1 parent 3aedcca commit 9e18451
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 9e18451

Please sign in to comment.