mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
consolidate tool id shortening methods
This commit is contained in:
@@ -22,6 +22,8 @@ import { getCompatibleRecommendations } from "components/Workflow/Editor/modules
|
||||
import * as d3 from "d3";
|
||||
import { getAppRoot } from "onload/loadConfig";
|
||||
|
||||
import { getShortToolId } from "@/utils/tool";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
toolId: {
|
||||
@@ -38,12 +40,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
getToolId() {
|
||||
let toolId = this.toolId || "";
|
||||
if (toolId.indexOf("/") > 0) {
|
||||
const toolIdSlash = toolId.split("/");
|
||||
toolId = toolIdSlash[toolIdSlash.length - 2];
|
||||
}
|
||||
return toolId;
|
||||
return getShortToolId(this.toolId ?? "");
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -22,6 +22,7 @@ import LoadingSpan from "components/LoadingSpan";
|
||||
import _l from "utils/localization";
|
||||
|
||||
import { useWorkflowStores } from "@/composables/workflowStores";
|
||||
import { getShortToolId } from "@/utils/tool";
|
||||
|
||||
import { getToolPredictions } from "./modules/services";
|
||||
import { getCompatibleRecommendations } from "./modules/utilities";
|
||||
@@ -59,11 +60,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getToolId(toolId) {
|
||||
if (toolId !== undefined && toolId !== null && toolId.indexOf("/") > -1) {
|
||||
const toolIdSlash = toolId.split("/");
|
||||
toolId = toolIdSlash[toolIdSlash.length - 2];
|
||||
}
|
||||
return toolId;
|
||||
return getShortToolId(toolId ?? "");
|
||||
},
|
||||
getWorkflowPath(currentNodeId) {
|
||||
const steps = {};
|
||||
|
||||
Reference in New Issue
Block a user