Skip to content

Commit

Permalink
Drop legacy tool_runer link, min_width
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Oct 17, 2024
1 parent b342cf5 commit ef2bd7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
9 changes: 8 additions & 1 deletion client/src/components/Panels/Common/Tool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions client/src/stores/toolStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 1 addition & 6 deletions lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ef2bd7b

Please sign in to comment.