Loading client/src/components/Workflow/Editor/Index.vue +19 −21 Original line number Diff line number Diff line Loading @@ -643,27 +643,25 @@ export default { this.isCanvas = true; return; } const stepData = { name: name, content_id: contentId, input_connections: {}, type: type, outputs: [], position: defaultPosition(this.graphOffset, this.transform), post_job_actions: {}, }; const { id } = this.stepStore.addStep(stepData); getModule(stepData, id, this.stateStore.setLoadingState).then((response) => { const stepData = this.stepStore.insertNewStep( contentId, name, type, defaultPosition(this.graphOffset, this.transform) ); getModule({ name, type, content_id: contentId }, stepData.id, this.stateStore.setLoadingState).then( (response) => { this.stepStore.updateStep({ ...stepData, id: id, tool_state: response.tool_state, inputs: response.inputs, outputs: response.outputs, config_form: response.config_form, }); this.stateStore.setActiveNode(id); }); this.stateStore.setActiveNode(stepData.id); } ); }, async _loadEditorData(data) { if (data.name !== undefined) { Loading client/src/components/Workflow/Editor/composables/useStepProps.ts +1 −1 Original line number Diff line number Diff line Loading @@ -11,12 +11,12 @@ export function useStepProps(step: Ref<Step>) { type, inputs: stepInputs, outputs: stepOutputs, config_form: configForm, post_job_actions: postJobActions, } = toRefs(step); const label = computed(() => step.value.label ?? undefined); const annotation = computed(() => step.value.annotation ?? null); const configForm = computed(() => step.value.config_form); return { stepId, Loading client/src/stores/workflowStepStore.ts +19 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,25 @@ export const useWorkflowStepStore = defineStore("workflowStepStore", { this.stepExtraInputs[step.id] = getStepExtraInputs(step); return step; }, insertNewStep( contentId: NewStep["content_id"], name: NewStep["name"], type: NewStep["type"], position: NewStep["position"] ) { const stepData: NewStep = { name: name, content_id: contentId, input_connections: {}, type: type, inputs: [], outputs: [], position: position, post_job_actions: {}, tool_state: {}, }; return this.addStep(stepData); }, updateStep(this: State, step: Step) { const workflow_outputs = step.workflow_outputs?.filter((workflowOutput) => step.outputs.find((output) => workflowOutput.output_name == output.name) Loading lib/galaxy/webapps/galaxy/api/workflows.py +1 −2 Original line number Diff line number Diff line Loading @@ -574,6 +574,7 @@ class WorkflowsAPIController( POST /api/workflows/build_module Builds module models for the workflow editor. """ # payload is tool state if payload is None: payload = {} inputs = payload.get("inputs", {}) Loading @@ -584,8 +585,6 @@ class WorkflowsAPIController( populate_state(trans, module.get_inputs(), inputs, module_state, check=False) module.recover_state(module_state, from_tool_form=True) return { "label": inputs.get("__label", ""), "annotation": inputs.get("__annotation", ""), "name": module.get_name(), "tool_state": module.get_state(), "content_id": module.get_content_id(), Loading Loading
client/src/components/Workflow/Editor/Index.vue +19 −21 Original line number Diff line number Diff line Loading @@ -643,27 +643,25 @@ export default { this.isCanvas = true; return; } const stepData = { name: name, content_id: contentId, input_connections: {}, type: type, outputs: [], position: defaultPosition(this.graphOffset, this.transform), post_job_actions: {}, }; const { id } = this.stepStore.addStep(stepData); getModule(stepData, id, this.stateStore.setLoadingState).then((response) => { const stepData = this.stepStore.insertNewStep( contentId, name, type, defaultPosition(this.graphOffset, this.transform) ); getModule({ name, type, content_id: contentId }, stepData.id, this.stateStore.setLoadingState).then( (response) => { this.stepStore.updateStep({ ...stepData, id: id, tool_state: response.tool_state, inputs: response.inputs, outputs: response.outputs, config_form: response.config_form, }); this.stateStore.setActiveNode(id); }); this.stateStore.setActiveNode(stepData.id); } ); }, async _loadEditorData(data) { if (data.name !== undefined) { Loading
client/src/components/Workflow/Editor/composables/useStepProps.ts +1 −1 Original line number Diff line number Diff line Loading @@ -11,12 +11,12 @@ export function useStepProps(step: Ref<Step>) { type, inputs: stepInputs, outputs: stepOutputs, config_form: configForm, post_job_actions: postJobActions, } = toRefs(step); const label = computed(() => step.value.label ?? undefined); const annotation = computed(() => step.value.annotation ?? null); const configForm = computed(() => step.value.config_form); return { stepId, Loading
client/src/stores/workflowStepStore.ts +19 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,25 @@ export const useWorkflowStepStore = defineStore("workflowStepStore", { this.stepExtraInputs[step.id] = getStepExtraInputs(step); return step; }, insertNewStep( contentId: NewStep["content_id"], name: NewStep["name"], type: NewStep["type"], position: NewStep["position"] ) { const stepData: NewStep = { name: name, content_id: contentId, input_connections: {}, type: type, inputs: [], outputs: [], position: position, post_job_actions: {}, tool_state: {}, }; return this.addStep(stepData); }, updateStep(this: State, step: Step) { const workflow_outputs = step.workflow_outputs?.filter((workflowOutput) => step.outputs.find((output) => workflowOutput.output_name == output.name) Loading
lib/galaxy/webapps/galaxy/api/workflows.py +1 −2 Original line number Diff line number Diff line Loading @@ -574,6 +574,7 @@ class WorkflowsAPIController( POST /api/workflows/build_module Builds module models for the workflow editor. """ # payload is tool state if payload is None: payload = {} inputs = payload.get("inputs", {}) Loading @@ -584,8 +585,6 @@ class WorkflowsAPIController( populate_state(trans, module.get_inputs(), inputs, module_state, check=False) module.recover_state(module_state, from_tool_form=True) return { "label": inputs.get("__label", ""), "annotation": inputs.get("__annotation", ""), "name": module.get_name(), "tool_state": module.get_state(), "content_id": module.get_content_id(), Loading