From 49ece6d3bd30f5ec8938fe838b9859d6743b9e57 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 10 Mar 2025 11:04:36 -0500 Subject: [PATCH 1/2] fix workflow run graph non input steps not appearing bug --- client/src/composables/useWorkflowRunGraph.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/composables/useWorkflowRunGraph.ts b/client/src/composables/useWorkflowRunGraph.ts index 75357042060..f10b097cb38 100644 --- a/client/src/composables/useWorkflowRunGraph.ts +++ b/client/src/composables/useWorkflowRunGraph.ts @@ -86,7 +86,7 @@ export function useWorkflowRunGraph( /** The steps of the original workflow */ const workflowSteps = computed>>(() => loadedWorkflow.value?.steps); - const steps = computed>(() => { + const steps = computed>>(() => { if (!workflowSteps.value || !formInputs.value || !inputs.value) { return {}; } @@ -103,6 +103,9 @@ export function useWorkflowRunGraph( const dataInput = inputs.value[step.id.toString()]; const formInput = formInputs.value.find((input) => parseInt(input.name) === step.id); stepInfo = getWorkflowRunStepInfo(formInput, dataInput); + } else { + // not an input, so just the original step + result[stepId] = step; } if (stepInfo) { result[stepId] = { ...step, ...stepInfo }; From c1e42174a6cfaf1e7fe09db51374a2668664db65 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 10 Mar 2025 11:35:41 -0500 Subject: [PATCH 2/2] do not render switch to simple form button if unusable --- client/src/components/Workflow/Run/WorkflowRun.vue | 5 +++++ client/src/components/Workflow/Run/WorkflowRunForm.vue | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/client/src/components/Workflow/Run/WorkflowRun.vue b/client/src/components/Workflow/Run/WorkflowRun.vue index 60e2e491abe..44a562478eb 100644 --- a/client/src/components/Workflow/Run/WorkflowRun.vue +++ b/client/src/components/Workflow/Run/WorkflowRun.vue @@ -49,6 +49,7 @@ const hasUpgradeMessages = ref(false); const hasStepVersionChanges = ref(false); const invocations = ref([]); const simpleForm = ref(false); +const disableSimpleForm = ref(false); const submissionError = ref(""); const workflowError = ref(""); const workflowName = ref(""); @@ -108,6 +109,7 @@ async function loadRun() { if (incomingModel.hasReplacementParametersInToolForm) { console.log("cannot render simple workflow form - has ${} values in tool steps"); simpleForm.value = false; + disableSimpleForm.value = true; } // If there are required parameters in a tool form (a disconnected runtime // input), we have to render the tool form steps and cannot use the @@ -115,12 +117,14 @@ async function loadRun() { if (incomingModel.hasOpenToolSteps) { console.log("cannot render simple workflow form - one or more tools have disconnected runtime inputs"); simpleForm.value = false; + disableSimpleForm.value = true; } // Just render the whole form for resource request parameters (kind of // niche - I'm not sure anyone is using these currently anyway). if (incomingModel.hasWorkflowResourceParameters) { console.log(`Cannot render simple workflow form - workflow resource parameters are configured`); simpleForm.value = false; + disableSimpleForm.value = true; } } @@ -246,6 +250,7 @@ defineExpose({ v-else :model="workflowModel" :can-mutate-current-history="canRunOnHistory" + :disable-simple-form="disableSimpleForm" @submissionSuccess="handleInvocations" @submissionError="handleSubmissionError" @showSimple="advancedForm = false" /> diff --git a/client/src/components/Workflow/Run/WorkflowRunForm.vue b/client/src/components/Workflow/Run/WorkflowRunForm.vue index 261f2eede97..bfca309ac00 100644 --- a/client/src/components/Workflow/Run/WorkflowRunForm.vue +++ b/client/src/components/Workflow/Run/WorkflowRunForm.vue @@ -10,6 +10,7 @@ Workflow: {{ model.name }} (version: {{ model.runData.version + 1 }})