Skip to content

Commit 38f322f

Browse files
authored
Merge pull request #20431 from ahmedhamidawan/workflow_legacy_form_indicator
[25.0] Add user-facing explanation for legacy workflow run form usage
2 parents 100612b + 795d360 commit 38f322f

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

client/src/components/Workflow/Run/WorkflowRun.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ const hasStepVersionChanges = ref(false);
5454
const invocations = ref([]);
5555
const simpleForm = ref(false);
5656
const disableSimpleForm = ref(false);
57+
const disableSimpleFormReason = ref<
58+
"hasReplacementParameters" | "hasDisconnectedInputs" | "hasWorkflowResourceParameters" | undefined
59+
>(undefined);
5760
const submissionError = ref("");
5861
const workflowError = ref("");
5962
const workflowName = ref("");
@@ -115,24 +118,24 @@ async function loadRun() {
115118
// on the frontend. If these are implemented on the backend at some
116119
// point this restriction can be lifted.
117120
if (incomingModel.hasReplacementParametersInToolForm) {
118-
console.log("cannot render simple workflow form - has ${} values in tool steps");
119121
simpleForm.value = false;
120122
disableSimpleForm.value = true;
123+
disableSimpleFormReason.value = "hasReplacementParameters";
121124
}
122125
// If there are required parameters in a tool form (a disconnected runtime
123126
// input), we have to render the tool form steps and cannot use the
124127
// simplified tool form.
125128
if (incomingModel.hasOpenToolSteps) {
126-
console.log("cannot render simple workflow form - one or more tools have disconnected runtime inputs");
127129
simpleForm.value = false;
128130
disableSimpleForm.value = true;
131+
disableSimpleFormReason.value = "hasDisconnectedInputs";
129132
}
130133
// Just render the whole form for resource request parameters (kind of
131134
// niche - I'm not sure anyone is using these currently anyway).
132135
if (incomingModel.hasWorkflowResourceParameters) {
133-
console.log(`Cannot render simple workflow form - workflow resource parameters are configured`);
134136
simpleForm.value = false;
135137
disableSimpleForm.value = true;
138+
disableSimpleFormReason.value = "hasWorkflowResourceParameters";
136139
}
137140
}
138141
@@ -260,6 +263,7 @@ defineExpose({
260263
:model="workflowModel"
261264
:can-mutate-current-history="canRunOnHistory"
262265
:disable-simple-form="disableSimpleForm"
266+
:disable-simple-form-reason="disableSimpleFormReason"
263267
@submissionSuccess="handleInvocations"
264268
@submissionError="handleSubmissionError"
265269
@showSimple="advancedForm = false" />

client/src/components/Workflow/Run/WorkflowRunForm.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@
2626
@onClick="onExecute" />
2727
</div>
2828
</div>
29+
<BAlert v-if="disableSimpleFormReason" show variant="warning">
30+
This is the legacy workflow run form.
31+
<span v-if="disableSimpleFormReason === 'hasReplacementParameters'">
32+
This workflow contains parameters in tool steps that require advanced handling. The simplified form does
33+
not support these parameters.
34+
</span>
35+
<span v-else-if="disableSimpleFormReason === 'hasDisconnectedInputs'">
36+
One or more tools in this workflow have required inputs that are not connected to other steps. The
37+
simplified form cannot handle disconnected runtime inputs.
38+
</span>
39+
<span v-else-if="disableSimpleFormReason === 'hasWorkflowResourceParameters'">
40+
This workflow is configured with resource request parameters. The simplified form does not support
41+
workflows with resource options.
42+
</span>
43+
</BAlert>
2944
<FormCard v-if="wpInputsAvailable" title="Workflow Parameters">
3045
<template v-slot:body>
3146
<FormDisplay :inputs="wpInputs" @onChange="onWpInputs" />
@@ -108,6 +123,10 @@ export default {
108123
type: Boolean,
109124
default: false,
110125
},
126+
disableSimpleFormReason: {
127+
type: String,
128+
default: undefined,
129+
},
111130
},
112131
data() {
113132
return {

0 commit comments

Comments
 (0)