diff --git a/ui/src/workflows/components/workflow-creator.tsx b/ui/src/workflows/components/workflow-creator.tsx index a5e6c6e0e319..194d4f10ffaf 100644 --- a/ui/src/workflows/components/workflow-creator.tsx +++ b/ui/src/workflows/components/workflow-creator.tsx @@ -21,6 +21,7 @@ export function WorkflowCreator({namespace, onCreate}: {namespace: string; onCre const [stage, setStage] = useState('choose-method'); const [workflow, setWorkflow] = useState(); const [error, setError] = useState(); + const isFullEditorDisabled = process.env.UI_DISABLE_FULL_EDITOR === 'true'; useEffect(() => { services.workflowTemplate @@ -75,12 +76,16 @@ export function WorkflowCreator({namespace, onCreate}: {namespace: string; onCre onChange={templateName => setWorkflowTemplate((workflowTemplates || []).find(template => template.metadata.name === templateName.title))} /> -

Or:

-
- setStage('full-editor')}> - Edit using full workflow options - -
+ {!isFullEditorDisabled && ( + <> +

Or:

+
+ setStage('full-editor')}> + Edit using full workflow options + +
+ + )} )} {stage === 'submit-workflow' && workflowTemplate && ( @@ -93,12 +98,14 @@ export function WorkflowCreator({namespace, onCreate}: {namespace: string; onCre templates={workflowTemplate.spec.templates || []} workflowParameters={workflowTemplate.spec.arguments.parameters || []} /> - setStage('full-editor')}> - Edit using full workflow options - + {!isFullEditorDisabled && ( + setStage('full-editor')}> + Edit using full workflow options + + )} )} - {stage === 'full-editor' && workflow && ( + {stage === 'full-editor' && workflow && !isFullEditorDisabled && ( <>
@@ -118,7 +125,7 @@ export function WorkflowCreator({namespace, onCreate}: {namespace: string; onCre
- . +
)}