Loading client/src/components/Workflow/Import/TrsSearch.vue +18 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import { useRouter } from "vue-router/composables"; import { getRedirectOnImportPath } from "@/components/Workflow/redirectPath"; import { Services } from "@/components/Workflow/services"; import { useMarkdown } from "@/composables/markdown"; import { withPrefix } from "@/utils/redirect"; import type { TrsSelection } from "./types"; Loading @@ -26,6 +27,8 @@ type TrsSearchData = { [key: string]: unknown; }; const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true }); const fields = [ { key: "name", label: "Name" }, { key: "description", label: "Description" }, Loading Loading @@ -195,7 +198,22 @@ async function importVersion(trsId?: string, toolIdToImport?: string, version?: @onImport="(versionId) => importVersion(trsSelection?.id, row.item.data.id, versionId)" /> </BCard> </template> <template v-slot:cell(description)="row"> <span class="trs-description" v-html="renderMarkdown(row.item.data.description)" /> </template> </BTable> </div> </BCard> </template> <style> .trs-description { position: relative; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; } </style> client/src/components/Workflow/Import/TrsTool.vue +5 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ import { faUpload } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BButton } from "bootstrap-vue"; import { useMarkdown } from "@/composables/markdown"; import type { TrsTool, TrsToolVersion } from "./types"; library.add(faUpload); Loading @@ -18,6 +20,8 @@ const emit = defineEmits<{ (e: "onImport", versionId: string): void; }>(); const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true }); function importVersion(version: TrsToolVersion) { const version_id = version.id.includes(`:${version.name}`) ? version.name : version.id; emit("onImport", version_id); Loading @@ -34,7 +38,7 @@ function importVersion(version: TrsToolVersion) { <div> <b>Description:</b> <span>{{ props.trsTool.description }}</span> <span v-html="renderMarkdown(props.trsTool.description)" /> </div> <div> <b>Organization</b> Loading client/src/utils/navigation/navigation.yml +1 −1 Original line number Diff line number Diff line Loading @@ -691,7 +691,7 @@ trs_search: search: "#trs-search-query" search_result: type: xpath selector: "//td[contains(text(), '${workflow_name}')]" selector: "//td[contains(., '${workflow_name}')]" import_button: ".workflow-import" select_server_button: "#dropdownTrsServer" import_version: '[data-version-name*="${version}"]' Loading lib/galaxy_test/selenium/test_data_source_tools.py +2 −0 Original line number Diff line number Diff line import pytest from selenium.webdriver.support.ui import Select from galaxy.util.unittest_utils import skip_if_site_down Loading @@ -12,6 +13,7 @@ from .framework import ( class TestDataSource(SeleniumTestCase, UsesHistoryItemAssertions): ensure_registered = True @pytest.mark.skip("Skipping UCSC table direct1 data source test, chromedriver fails captcha") @selenium_test @managed_history @skip_if_site_down("https://genome.ucsc.edu/cgi-bin/hgTables") Loading tools/data_source/data_source.py +12 −7 Original line number Diff line number Diff line Loading @@ -8,7 +8,10 @@ from urllib.parse import ( urlencode, urlparse, ) from urllib.request import urlopen from urllib.request import ( Request, urlopen, ) from galaxy.datatypes import sniff from galaxy.datatypes.registry import Registry Loading @@ -17,6 +20,7 @@ from galaxy.util import ( get_charset_from_http_headers, stream_to_open_named_file, ) from galaxy.util.user_agent import get_default_headers GALAXY_PARAM_PREFIX = "GALAXY" GALAXY_ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) Loading Loading @@ -51,15 +55,16 @@ def __main__(): sys.exit("The remote data source application has not sent back a URL parameter in the request.") # The following calls to urlopen() will use the above default timeout headers = get_default_headers() try: if URL_method == "get": page = urlopen(cur_URL, timeout=DEFAULT_SOCKET_TIMEOUT) req = Request(cur_URL, headers=headers) elif URL_method == "post": page = urlopen( cur_URL, urlencode(params["param_dict"]["incoming_request_params"]).encode("utf-8"), timeout=DEFAULT_SOCKET_TIMEOUT, ) data = urlencode(params["param_dict"]["incoming_request_params"]).encode("utf-8") req = Request(cur_URL, data=data, headers=headers) else: raise Exception("Unknown URL_method specified: %s" % URL_method) page = urlopen(req, timeout=DEFAULT_SOCKET_TIMEOUT) except Exception as e: sys.exit("The remote data source application may be off line, please try again later. Error: %s" % str(e)) if max_file_size: Loading Loading
client/src/components/Workflow/Import/TrsSearch.vue +18 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import { useRouter } from "vue-router/composables"; import { getRedirectOnImportPath } from "@/components/Workflow/redirectPath"; import { Services } from "@/components/Workflow/services"; import { useMarkdown } from "@/composables/markdown"; import { withPrefix } from "@/utils/redirect"; import type { TrsSelection } from "./types"; Loading @@ -26,6 +27,8 @@ type TrsSearchData = { [key: string]: unknown; }; const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true }); const fields = [ { key: "name", label: "Name" }, { key: "description", label: "Description" }, Loading Loading @@ -195,7 +198,22 @@ async function importVersion(trsId?: string, toolIdToImport?: string, version?: @onImport="(versionId) => importVersion(trsSelection?.id, row.item.data.id, versionId)" /> </BCard> </template> <template v-slot:cell(description)="row"> <span class="trs-description" v-html="renderMarkdown(row.item.data.description)" /> </template> </BTable> </div> </BCard> </template> <style> .trs-description { position: relative; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; } </style>
client/src/components/Workflow/Import/TrsTool.vue +5 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ import { faUpload } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BButton } from "bootstrap-vue"; import { useMarkdown } from "@/composables/markdown"; import type { TrsTool, TrsToolVersion } from "./types"; library.add(faUpload); Loading @@ -18,6 +20,8 @@ const emit = defineEmits<{ (e: "onImport", versionId: string): void; }>(); const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true }); function importVersion(version: TrsToolVersion) { const version_id = version.id.includes(`:${version.name}`) ? version.name : version.id; emit("onImport", version_id); Loading @@ -34,7 +38,7 @@ function importVersion(version: TrsToolVersion) { <div> <b>Description:</b> <span>{{ props.trsTool.description }}</span> <span v-html="renderMarkdown(props.trsTool.description)" /> </div> <div> <b>Organization</b> Loading
client/src/utils/navigation/navigation.yml +1 −1 Original line number Diff line number Diff line Loading @@ -691,7 +691,7 @@ trs_search: search: "#trs-search-query" search_result: type: xpath selector: "//td[contains(text(), '${workflow_name}')]" selector: "//td[contains(., '${workflow_name}')]" import_button: ".workflow-import" select_server_button: "#dropdownTrsServer" import_version: '[data-version-name*="${version}"]' Loading
lib/galaxy_test/selenium/test_data_source_tools.py +2 −0 Original line number Diff line number Diff line import pytest from selenium.webdriver.support.ui import Select from galaxy.util.unittest_utils import skip_if_site_down Loading @@ -12,6 +13,7 @@ from .framework import ( class TestDataSource(SeleniumTestCase, UsesHistoryItemAssertions): ensure_registered = True @pytest.mark.skip("Skipping UCSC table direct1 data source test, chromedriver fails captcha") @selenium_test @managed_history @skip_if_site_down("https://genome.ucsc.edu/cgi-bin/hgTables") Loading
tools/data_source/data_source.py +12 −7 Original line number Diff line number Diff line Loading @@ -8,7 +8,10 @@ from urllib.parse import ( urlencode, urlparse, ) from urllib.request import urlopen from urllib.request import ( Request, urlopen, ) from galaxy.datatypes import sniff from galaxy.datatypes.registry import Registry Loading @@ -17,6 +20,7 @@ from galaxy.util import ( get_charset_from_http_headers, stream_to_open_named_file, ) from galaxy.util.user_agent import get_default_headers GALAXY_PARAM_PREFIX = "GALAXY" GALAXY_ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) Loading Loading @@ -51,15 +55,16 @@ def __main__(): sys.exit("The remote data source application has not sent back a URL parameter in the request.") # The following calls to urlopen() will use the above default timeout headers = get_default_headers() try: if URL_method == "get": page = urlopen(cur_URL, timeout=DEFAULT_SOCKET_TIMEOUT) req = Request(cur_URL, headers=headers) elif URL_method == "post": page = urlopen( cur_URL, urlencode(params["param_dict"]["incoming_request_params"]).encode("utf-8"), timeout=DEFAULT_SOCKET_TIMEOUT, ) data = urlencode(params["param_dict"]["incoming_request_params"]).encode("utf-8") req = Request(cur_URL, data=data, headers=headers) else: raise Exception("Unknown URL_method specified: %s" % URL_method) page = urlopen(req, timeout=DEFAULT_SOCKET_TIMEOUT) except Exception as e: sys.exit("The remote data source application may be off line, please try again later. Error: %s" % str(e)) if max_file_size: Loading