[ARVADOS-WORKBENCH2] updated: 1.4.1-253-gcb148df5

Git user git at public.arvados.org
Tue Jan 28 15:33:54 UTC 2020


Summary of changes:
 src/components/chips-input/chips-input.tsx                  | 13 ++++++-------
 .../process-input-dialog/process-input-dialog.tsx           | 11 +++++------
 .../run-process-panel/inputs/directory-array-input.tsx      |  2 +-
 src/views/run-process-panel/inputs/file-array-input.tsx     |  2 +-
 src/views/run-process-panel/inputs/float-array-input.tsx    |  2 +-
 src/views/run-process-panel/inputs/int-array-input.tsx      |  2 +-
 src/views/run-process-panel/inputs/string-array-input.tsx   |  4 ++--
 7 files changed, 17 insertions(+), 19 deletions(-)

       via  cb148df557f0134b641e38dc48d1f0570fb2e285 (commit)
       via  36ab91214cbf5d196f825c666e7018eb9122e5c6 (commit)
       via  793c341959d618ffb76bf8f1030f94e33870919c (commit)
      from  874af8e3cf9cb2e0a0a151f3e024c7bdfe8855f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit cb148df557f0134b641e38dc48d1f0570fb2e285
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Tue Jan 28 12:33:08 2020 -0300

    16086: Looks up input values by the correct input id.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/src/views-components/process-input-dialog/process-input-dialog.tsx b/src/views-components/process-input-dialog/process-input-dialog.tsx
index a2d59407..6ccf264c 100644
--- a/src/views-components/process-input-dialog/process-input-dialog.tsx
+++ b/src/views-components/process-input-dialog/process-input-dialog.tsx
@@ -36,15 +36,14 @@ export const ProcessInputDialog = withDialog(PROCESS_INPUT_DIALOG_NAME)(
 const getInputs = (data: any) => {
     if (!data || !data.mounts || !data.mounts[MOUNT_PATH_CWL_WORKFLOW]) { return []; }
     const inputs = getWorkflowInputs(data.mounts[MOUNT_PATH_CWL_WORKFLOW].content);
-    return inputs ? inputs.map(
-        (it: any) => (
+    return inputs
+        ? inputs.map( (it: any) => (
             {
                 type: it.type,
                 id: it.id,
                 label: it.label,
-                value: data.mounts[MOUNT_PATH_CWL_INPUT].content[it.id],
+                value: data.mounts[MOUNT_PATH_CWL_INPUT].content[it.id.split('#main/')[1]] || [],
                 disabled: true
-            }
-        )
-    ) : [];
+            }))
+        : [];
 };

commit 36ab91214cbf5d196f825c666e7018eb9122e5c6
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Jan 27 18:38:24 2020 -0300

    16086: Enhances readability by using plural on Array var's name.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/src/components/chips-input/chips-input.tsx b/src/components/chips-input/chips-input.tsx
index 13699660..790d49eb 100644
--- a/src/components/chips-input/chips-input.tsx
+++ b/src/components/chips-input/chips-input.tsx
@@ -9,7 +9,7 @@ import { StyleRulesCallback } from '@material-ui/core/styles';
 import { InputProps } from '@material-ui/core/Input';
 
 interface ChipsInputProps<Value> {
-    value: Value[];
+    values: Value[];
     getLabel?: (value: Value) => string;
     onChange: (value: Value[]) => void;
     createNewValue: (value: string) => Value;
@@ -64,13 +64,13 @@ export const ChipsInput = withStyles(styles)(
             if (this.state.text) {
                 const newValue = this.props.createNewValue(this.state.text);
                 this.setState({ text: '' });
-                this.props.onChange([...this.props.value, newValue]);
+                this.props.onChange([...this.props.values, newValue]);
             }
         }
 
         deleteLastValue = () => {
-            if (this.state.text.length === 0 && this.props.value.length > 0) {
-                this.props.onChange(this.props.value.slice(0, -1));
+            if (this.state.text.length === 0 && this.props.values.length > 0) {
+                this.props.onChange(this.props.values.slice(0, -1));
             }
         }
 
@@ -103,12 +103,11 @@ export const ChipsInput = withStyles(styles)(
         }
 
         renderChips() {
-            const { classes, value, ...props } = this.props;
+            const { classes, ...props } = this.props;
             return <div className={classes.chips}>
                 <Chips
                     {...props}
                     clickable={!props.disabled}
-                    values={value}
                     filler={<div ref={this.filler} />}
                 />
             </div>;
@@ -132,7 +131,7 @@ export const ChipsInput = withStyles(styles)(
         }
 
         componentDidUpdate(prevProps: ChipsInputProps<Value>) {
-            if (prevProps.value !== this.props.value) {
+            if (prevProps.values !== this.props.values) {
                 this.updateCursorPosition();
             }
         }
diff --git a/src/views/run-process-panel/inputs/directory-array-input.tsx b/src/views/run-process-panel/inputs/directory-array-input.tsx
index 7b238832..8b03a123 100644
--- a/src/views/run-process-panel/inputs/directory-array-input.tsx
+++ b/src/views/run-process-panel/inputs/directory-array-input.tsx
@@ -211,7 +211,7 @@ const DirectoryArrayInputComponent = connect(mapStateToProps)(
 
         chipsInput = () =>
             <ChipsInput
-                value={this.props.input.value}
+                values={this.props.input.value}
                 onChange={noop}
                 disabled={this.props.commandInput.disabled}
                 createNewValue={identity}
diff --git a/src/views/run-process-panel/inputs/file-array-input.tsx b/src/views/run-process-panel/inputs/file-array-input.tsx
index 88f8a00c..14d16824 100644
--- a/src/views/run-process-panel/inputs/file-array-input.tsx
+++ b/src/views/run-process-panel/inputs/file-array-input.tsx
@@ -193,7 +193,7 @@ const FileArrayInputComponent = connect(mapStateToProps)(
 
         chipsInput = () =>
             <ChipsInput
-                value={this.props.input.value}
+                values={this.props.input.value}
                 disabled={this.props.commandInput.disabled}
                 onChange={noop}
                 createNewValue={identity}
diff --git a/src/views/run-process-panel/inputs/float-array-input.tsx b/src/views/run-process-panel/inputs/float-array-input.tsx
index 225a7727..818a0518 100644
--- a/src/views/run-process-panel/inputs/float-array-input.tsx
+++ b/src/views/run-process-panel/inputs/float-array-input.tsx
@@ -46,7 +46,7 @@ class InputComponent extends React.PureComponent<GenericInputProps>{
             deletable={!commandInput.disabled}
             orderable={!commandInput.disabled}
             disabled={commandInput.disabled}
-            value={input.value}
+            values={input.value}
             onChange={this.handleChange}
             createNewValue={parseFloat}
             inputComponent={FloatInput}
diff --git a/src/views/run-process-panel/inputs/int-array-input.tsx b/src/views/run-process-panel/inputs/int-array-input.tsx
index 22c069b5..c625f955 100644
--- a/src/views/run-process-panel/inputs/int-array-input.tsx
+++ b/src/views/run-process-panel/inputs/int-array-input.tsx
@@ -46,7 +46,7 @@ class InputComponent extends React.PureComponent<GenericInputProps>{
             deletable={!commandInput.disabled}
             orderable={!commandInput.disabled}
             disabled={commandInput.disabled}
-            value={input.value}
+            values={input.value}
             onChange={this.handleChange}
             createNewValue={value => parseInt(value, 10)}
             inputComponent={IntInput}
diff --git a/src/views/run-process-panel/inputs/string-array-input.tsx b/src/views/run-process-panel/inputs/string-array-input.tsx
index c73b39bf..39dbe0af 100644
--- a/src/views/run-process-panel/inputs/string-array-input.tsx
+++ b/src/views/run-process-panel/inputs/string-array-input.tsx
@@ -47,7 +47,7 @@ class InputComponent extends React.PureComponent<GenericInputProps>{
             deletable={!commandInput.disabled}
             orderable={!commandInput.disabled}
             disabled={commandInput.disabled}
-            value={input.value}
+            values={input.value}
             onChange={this.handleChange}
             createNewValue={identity}
             inputComponent={Input}

commit 793c341959d618ffb76bf8f1030f94e33870919c
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Jan 27 17:54:56 2020 -0300

    16086: Adds default value on string array validator.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/src/views/run-process-panel/inputs/string-array-input.tsx b/src/views/run-process-panel/inputs/string-array-input.tsx
index e560b337..c73b39bf 100644
--- a/src/views/run-process-panel/inputs/string-array-input.tsx
+++ b/src/views/run-process-panel/inputs/string-array-input.tsx
@@ -30,7 +30,7 @@ const validationSelector = createSelector(
         : undefined
 );
 
-const required = (value: string[]) =>
+const required = (value: string[] = []) =>
     value.length > 0
         ? undefined
         : ERROR_MESSAGE;

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list