From 7e5fa95311e6a10ba8cc655bf5119059e3a903f1 Mon Sep 17 00:00:00 2001 From: tooptoop4 <33283496+tooptoop4@users.noreply.github.com> Date: Wed, 30 Oct 2024 21:37:44 +1100 Subject: [PATCH] Signed-off-by: tooptoop4 <33283496+tooptoop4@users.noreply.github.com> --- .../workflows/components/workflow-creator.tsx | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) 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
- . +
)}