[arvados-workbench2] created: 2.5.0-63-g5da46a24

git repository hosting git at public.arvados.org
Mon Feb 20 16:55:21 UTC 2023


        at  5da46a24f0381fb708e8b06f8daba6c9df6cd274 (commit)


commit 5da46a24f0381fb708e8b06f8daba6c9df6cd274
Author: Stephen Smith <stephen at curii.com>
Date:   Mon Feb 20 11:54:43 2023 -0500

    19908: Add optional required flag for project input, make not required for advanced search
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/views/run-process-panel/inputs/project-input.tsx b/src/views/run-process-panel/inputs/project-input.tsx
index ef6d08f4..97028fc9 100644
--- a/src/views/run-process-panel/inputs/project-input.tsx
+++ b/src/views/run-process-panel/inputs/project-input.tsx
@@ -24,19 +24,20 @@ export type ProjectCommandInputParameter = GenericCommandInputParameter<ProjectR
 const require: any = (value?: ProjectResource) => (value === undefined);
 
 export interface ProjectInputProps {
+    required?: boolean;
     input: ProjectCommandInputParameter;
     options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
 }
 
 type DialogContentCssRules = 'root' | 'pickerWrapper';
 
-export const ProjectInput = ({ input, options }: ProjectInputProps) =>
+export const ProjectInput = ({ required, input, options }: ProjectInputProps) =>
     <Field
         name={input.id}
         commandInput={input}
         component={ProjectInputComponent as any}
         format={format}
-        validate={require}
+        validate={required ? require : undefined}
         {...{
             options
         }} />;
diff --git a/src/views/run-process-panel/run-process-basic-form.tsx b/src/views/run-process-panel/run-process-basic-form.tsx
index 32a126a4..a6f7a706 100644
--- a/src/views/run-process-panel/run-process-basic-form.tsx
+++ b/src/views/run-process-panel/run-process-basic-form.tsx
@@ -40,7 +40,7 @@ export const RunProcessBasicForm =
                         label="Optional description of this workflow run" />
                 </Grid>
                 <Grid item xs={12} md={6}>
-                    <ProjectInput input={{
+                    <ProjectInput required input={{
                         id: "owner",
                         label: "Project where the workflow will run"
                     } as ProjectCommandInputParameter}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list