-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix the pipeline details fetch for URLs with credentials #998 Signed-off-by: tdruez <[email protected]> * Remove the console.log debug statement #998 Signed-off-by: tdruez <[email protected]> --------- Signed-off-by: tdruez <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,17 @@ | |
if (modal_id !== "run-detail-modal") return; | ||
|
||
let $modal = document.getElementById(modal_id); | ||
let run_uuid = event.detail.$button.dataset.uuid; | ||
let run_detail_url = `/run/${run_uuid}/`; | ||
$modal.innerHTML = ""; | ||
|
||
let run_uuid = event.detail.$button.dataset.uuid; | ||
let run_detail_path = `/run/${run_uuid}/`; | ||
|
||
// Construct the full URL by combining the current origin and the relative path. | ||
// It's important to use the URL constructor, as directly providing the relative | ||
// path to the `fetch` function may not work correctly, especially for URLs | ||
// that include credentials such as "user:[email protected]". | ||
let run_detail_url = new URL(run_detail_path, window.location.origin); | ||
|
||
fetch(run_detail_url).then(function (response) { | ||
if (response.ok) { | ||
return response.text(); | ||
|