@@ -54,6 +54,9 @@ const hasStepVersionChanges = ref(false);
5454const invocations = ref ([]);
5555const simpleForm = ref (false );
5656const disableSimpleForm = ref (false );
57+ const disableSimpleFormReason = ref <
58+ " hasReplacementParameters" | " hasDisconnectedInputs" | " hasWorkflowResourceParameters" | undefined
59+ > (undefined );
5760const submissionError = ref (" " );
5861const workflowError = ref (" " );
5962const 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" />
0 commit comments