Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): Add namespace input to ClusterWorkflowTemplate submit. Fixes #10398 #13596

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export function ClusterWorkflowTemplateDetails({history, location, match}: Route
<SubmitWorkflowPanel
kind='ClusterWorkflowTemplate'
namespace={namespace}
onNamespaceChange={setNamespace}
name={template.metadata.name}
entrypoint={template.spec.entrypoint}
templates={template.spec.templates || []}
Expand Down
10 changes: 9 additions & 1 deletion ui/src/app/workflows/components/submit-workflow-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Select} from 'argo-ui/src/components/select/select';
import {TextInput} from '../../shared/components/text-input';
agilgur5 marked this conversation as resolved.
Show resolved Hide resolved
import React, {useContext, useMemo, useState} from 'react';

import {Parameter, Template} from '../../../models';
Expand All @@ -11,8 +12,9 @@ import {services} from '../../shared/services';
import {Utils} from '../../shared/utils';

interface Props {
kind: string;
kind: 'ClusterWorkflowTemplate' | 'WorkflowTemplate';
namespace: string;
onNamespaceChange?: (namespace: string) => void;
name: string;
entrypoint: string;
templates: Template[];
Expand Down Expand Up @@ -73,6 +75,12 @@ export function SubmitWorkflowPanel(props: Props) {
</h5>
{error && <ErrorNotice error={error} />}
<div className='white-box'>
{props.onNamespaceChange && (
<div key='namespace' style={{marginBottom: 25}}>
<label>Namespace</label>
<TextInput value={props.namespace} onChange={props.onNamespaceChange} />
</div>
)}
<div key='entrypoint' title='Entrypoint' style={{marginBottom: 25}}>
<label>Entrypoint</label>
<Select
Expand Down
Loading