diff --git a/client/src/components/Panels/Common/Tool.vue b/client/src/components/Panels/Common/Tool.vue index 2ed5e20820fd..10c00b5407b6 100644 --- a/client/src/components/Panels/Common/Tool.vue +++ b/client/src/components/Panels/Common/Tool.vue @@ -8,7 +8,7 @@ v-else :class="targetClass" :data-tool-id="tool.id" - :href="tool.link" + :href="href" :target="tool.target" :title="tool.help" @click="onClick"> @@ -71,6 +71,13 @@ export default { return `title-link cursor-pointer`; } }, + href() { + if (this.tool.model_class === "DataSourceTool") { + return `/tool_runner/data_source_redirect?tool_id=${encodeURIComponent(this.tool.id)}`; + } else { + return `/?tool_id=${encodeURIComponent(this.tool.id)}&version=latest`; + } + }, }, methods: { onClick(evt) { diff --git a/client/src/stores/toolStore.ts b/client/src/stores/toolStore.ts index e0e2b1439c6f..b776a9796a40 100644 --- a/client/src/stores/toolStore.ts +++ b/client/src/stores/toolStore.ts @@ -24,8 +24,6 @@ export interface Tool { is_workflow_compatible: boolean; xrefs: string[]; config_file: string; - link: string; - min_width: number; target: string; panel_section_id: string; panel_section_name: string | null; diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index a7b6c96bc1f3..cbcb6d2a04ea 100644 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -2536,14 +2536,9 @@ def to_dict(self, trans, link_details=False, io_details=False, tool_help=False): # Add link details. if link_details: - # Add details for creating a hyperlink to the tool. - if not isinstance(self, DataSourceTool): - link = self.app.url_for(controller="tool_runner", tool_id=self.id) - else: - link = self.app.url_for(controller="tool_runner", action="data_source_redirect", tool_id=self.id) # Basic information - tool_dict.update({"link": link, "min_width": self.uihints.get("minwidth", -1), "target": self.target}) + tool_dict["target"] = self.target # Add input and output details. if io_details: