forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request galaxyproject#17497 from mvdbeek/provide_working_u…
…rl_for_to_every_request [23.2] Provide working routes.url_for every ASGI request
- Loading branch information
Showing
10 changed files
with
52 additions
and
61 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
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
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 |
---|---|---|
|
@@ -90,7 +90,7 @@ def as_ucsc_display_file(self, dataset: DatasetProtocol, **kwd) -> Union[FileObj | |
""" | ||
return open(dataset.get_file_name(), "rb") | ||
|
||
def ucsc_links(self, dataset: DatasetProtocol, type: str, app, base_url: str, request) -> List: | ||
def ucsc_links(self, dataset: DatasetProtocol, type: str, app, base_url: str) -> List: | ||
""" | ||
from the ever-helpful angie hinrichs [email protected] | ||
a genome graphs call looks like this | ||
|
@@ -114,17 +114,15 @@ def ucsc_links(self, dataset: DatasetProtocol, type: str, app, base_url: str, re | |
for site_name, site_url in app.datatypes_registry.get_legacy_sites_by_build("ucsc", dataset.dbkey): | ||
if site_name in app.datatypes_registry.get_display_sites("ucsc"): | ||
site_url = site_url.replace("/hgTracks?", "/hgGenome?") # for genome graphs | ||
internal_url = "%s" % app.legacy_url_for( | ||
mapper=app.legacy_mapper, | ||
environ=request.environ, | ||
internal_url = app.url_for( | ||
controller="dataset", | ||
dataset_id=dataset.id, | ||
action="display_at", | ||
filename=f"ucsc_{site_name}", | ||
) | ||
display_url = "%s%s/display_as?id=%i&display_app=%s&authz_method=display_at" % ( | ||
base_url, | ||
app.legacy_url_for(mapper=app.legacy_mapper, environ=request.environ, controller="root"), | ||
app.url_for(controller="root"), | ||
dataset.id, | ||
type, | ||
) | ||
|
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
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
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