Skip to content

Commit 30af8fb

Browse files
committed
Merge branch 'release_25.0' into dev
2 parents dcd415a + 4225e4b commit 30af8fb

File tree

5 files changed

+38
-9
lines changed

5 files changed

+38
-9
lines changed

client/src/components/Workflow/Import/TrsSearch.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useRouter } from "vue-router/composables";
99
1010
import { getRedirectOnImportPath } from "@/components/Workflow/redirectPath";
1111
import { Services } from "@/components/Workflow/services";
12+
import { useMarkdown } from "@/composables/markdown";
1213
import { withPrefix } from "@/utils/redirect";
1314
1415
import type { TrsSelection } from "./types";
@@ -26,6 +27,8 @@ type TrsSearchData = {
2627
[key: string]: unknown;
2728
};
2829
30+
const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true });
31+
2932
const fields = [
3033
{ key: "name", label: "Name" },
3134
{ key: "description", label: "Description" },
@@ -195,7 +198,22 @@ async function importVersion(trsId?: string, toolIdToImport?: string, version?:
195198
@onImport="(versionId) => importVersion(trsSelection?.id, row.item.data.id, versionId)" />
196199
</BCard>
197200
</template>
201+
202+
<template v-slot:cell(description)="row">
203+
<span class="trs-description" v-html="renderMarkdown(row.item.data.description)" />
204+
</template>
198205
</BTable>
199206
</div>
200207
</BCard>
201208
</template>
209+
210+
<style>
211+
.trs-description {
212+
position: relative;
213+
overflow: hidden;
214+
display: -webkit-box;
215+
-webkit-box-orient: vertical;
216+
-webkit-line-clamp: 3;
217+
line-clamp: 3;
218+
}
219+
</style>

client/src/components/Workflow/Import/TrsTool.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { faUpload } from "@fortawesome/free-solid-svg-icons";
44
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
55
import { BButton } from "bootstrap-vue";
66
7+
import { useMarkdown } from "@/composables/markdown";
8+
79
import type { TrsTool, TrsToolVersion } from "./types";
810
911
library.add(faUpload);
@@ -18,6 +20,8 @@ const emit = defineEmits<{
1820
(e: "onImport", versionId: string): void;
1921
}>();
2022
23+
const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true });
24+
2125
function importVersion(version: TrsToolVersion) {
2226
const version_id = version.id.includes(`:${version.name}`) ? version.name : version.id;
2327
emit("onImport", version_id);
@@ -34,7 +38,7 @@ function importVersion(version: TrsToolVersion) {
3438
<div>
3539
<b>Description:</b>
3640

37-
<span>{{ props.trsTool.description }}</span>
41+
<span v-html="renderMarkdown(props.trsTool.description)" />
3842
</div>
3943
<div>
4044
<b>Organization</b>

client/src/utils/navigation/navigation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ trs_search:
691691
search: "#trs-search-query"
692692
search_result:
693693
type: xpath
694-
selector: "//td[contains(text(), '${workflow_name}')]"
694+
selector: "//td[contains(., '${workflow_name}')]"
695695
import_button: ".workflow-import"
696696
select_server_button: "#dropdownTrsServer"
697697
import_version: '[data-version-name*="${version}"]'

lib/galaxy_test/selenium/test_data_source_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from selenium.webdriver.support.ui import Select
23

34
from galaxy.util.unittest_utils import skip_if_site_down
@@ -12,6 +13,7 @@
1213
class TestDataSource(SeleniumTestCase, UsesHistoryItemAssertions):
1314
ensure_registered = True
1415

16+
@pytest.mark.skip("Skipping UCSC table direct1 data source test, chromedriver fails captcha")
1517
@selenium_test
1618
@managed_history
1719
@skip_if_site_down("https://genome.ucsc.edu/cgi-bin/hgTables")

tools/data_source/data_source.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
urlencode,
99
urlparse,
1010
)
11-
from urllib.request import urlopen
11+
from urllib.request import (
12+
Request,
13+
urlopen,
14+
)
1215

1316
from galaxy.datatypes import sniff
1417
from galaxy.datatypes.registry import Registry
@@ -17,6 +20,7 @@
1720
get_charset_from_http_headers,
1821
stream_to_open_named_file,
1922
)
23+
from galaxy.util.user_agent import get_default_headers
2024

2125
GALAXY_PARAM_PREFIX = "GALAXY"
2226
GALAXY_ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
@@ -51,15 +55,16 @@ def __main__():
5155
sys.exit("The remote data source application has not sent back a URL parameter in the request.")
5256

5357
# The following calls to urlopen() will use the above default timeout
58+
headers = get_default_headers()
5459
try:
5560
if URL_method == "get":
56-
page = urlopen(cur_URL, timeout=DEFAULT_SOCKET_TIMEOUT)
61+
req = Request(cur_URL, headers=headers)
5762
elif URL_method == "post":
58-
page = urlopen(
59-
cur_URL,
60-
urlencode(params["param_dict"]["incoming_request_params"]).encode("utf-8"),
61-
timeout=DEFAULT_SOCKET_TIMEOUT,
62-
)
63+
data = urlencode(params["param_dict"]["incoming_request_params"]).encode("utf-8")
64+
req = Request(cur_URL, data=data, headers=headers)
65+
else:
66+
raise Exception("Unknown URL_method specified: %s" % URL_method)
67+
page = urlopen(req, timeout=DEFAULT_SOCKET_TIMEOUT)
6368
except Exception as e:
6469
sys.exit("The remote data source application may be off line, please try again later. Error: %s" % str(e))
6570
if max_file_size:

0 commit comments

Comments
 (0)