[ARVADOS-WORKBENCH2] created: 1.2.0-886-gde43488

Git user git at public.curoverse.com
Thu Nov 15 08:26:11 EST 2018


        at  de434883528ce218d384686092e82742a18491c7 (commit)


commit de434883528ce218d384686092e82742a18491c7
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Nov 15 14:25:22 2018 +0100

    Set pickerId prop for CopyProcessDialog
    
    Feature #14470
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/dialog-forms/copy-process-dialog.ts b/src/views-components/dialog-forms/copy-process-dialog.ts
index 4ec17c6..89d38f8 100644
--- a/src/views-components/dialog-forms/copy-process-dialog.ts
+++ b/src/views-components/dialog-forms/copy-process-dialog.ts
@@ -9,6 +9,7 @@ import { PROCESS_COPY_FORM_NAME } from '~/store/processes/process-copy-actions';
 import { DialogCopy } from "~/views-components/dialog-copy/dialog-copy";
 import { copyProcess } from '~/store/workbench/workbench-actions';
 import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
+import { pickerId } from "~/store/tree-picker/picker-id";
 
 export const CopyProcessDialog = compose(
     withDialog(PROCESS_COPY_FORM_NAME),
@@ -17,5 +18,6 @@ export const CopyProcessDialog = compose(
         onSubmit: (data, dispatch) => {
             dispatch(copyProcess(data));
         }
-    })
+    }),
+    pickerId(PROCESS_COPY_FORM_NAME),
 )(DialogCopy);
\ No newline at end of file

commit ea4c952433d2ee3906999f629b8bc2076e0af13c
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Nov 15 14:25:07 2018 +0100

    Add tree picker initialization for CopyProcessDialog
    
    Feature #14470
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/processes/process-copy-actions.ts b/src/store/processes/process-copy-actions.ts
index bb8d8f5..cd3fe21 100644
--- a/src/store/processes/process-copy-actions.ts
+++ b/src/store/processes/process-copy-actions.ts
@@ -11,6 +11,7 @@ import { ServiceRepository } from '~/services/services';
 import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
 import { getProcess, ProcessStatus, getProcessStatus } from '~/store/processes/process';
 import { snackbarActions } from '~/store/snackbar/snackbar-actions';
+import { initProjectsTreePicker } from '~/store/tree-picker/tree-picker-actions';
 
 export const PROCESS_COPY_FORM_NAME = 'processCopyFormName';
 
@@ -21,6 +22,7 @@ export const openCopyProcessDialog = (resource: { name: string, uuid: string })
             const processStatus = getProcessStatus(process);
             if (processStatus === ProcessStatus.DRAFT) {
                 dispatch<any>(resetPickerProjectTree());
+                dispatch<any>(initProjectsTreePicker(PROCESS_COPY_FORM_NAME));
                 const initialData: CopyFormDialogData = { name: `Copy of: ${resource.name}`, uuid: resource.uuid, ownerUuid: '' };
                 dispatch<any>(initialize(PROCESS_COPY_FORM_NAME, initialData));
                 dispatch(dialogActions.OPEN_DIALOG({ id: PROCESS_COPY_FORM_NAME, data: {} }));

commit 2edee5acc1ef219dd90a7314c87df5683569afaa
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Nov 15 14:22:02 2018 +0100

    Set pickerId props for CopyCollectionDialog
    
    Feature #14470
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/dialog-forms/copy-collection-dialog.ts b/src/views-components/dialog-forms/copy-collection-dialog.ts
index 41309fd..3c8f7eb 100644
--- a/src/views-components/dialog-forms/copy-collection-dialog.ts
+++ b/src/views-components/dialog-forms/copy-collection-dialog.ts
@@ -9,6 +9,7 @@ import { COLLECTION_COPY_FORM_NAME } from '~/store/collections/collection-copy-a
 import { DialogCopy } from "~/views-components/dialog-copy/dialog-copy";
 import { copyCollection } from '~/store/workbench/workbench-actions';
 import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
+import { pickerId } from '~/store/tree-picker/picker-id';
 
 export const CopyCollectionDialog = compose(
     withDialog(COLLECTION_COPY_FORM_NAME),
@@ -17,5 +18,6 @@ export const CopyCollectionDialog = compose(
         onSubmit: (data, dispatch) => {
             dispatch(copyCollection(data));
         }
-    })
+    }),
+    pickerId(COLLECTION_COPY_FORM_NAME),
 )(DialogCopy);
\ No newline at end of file

commit 6f08c46e8d91662aab3b3e600868328c1bd1bacd
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Nov 15 14:21:44 2018 +0100

    Add tree picker initialization for CollectionCopyDialog
    
    Feature #14470
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/collections/collection-copy-actions.ts b/src/store/collections/collection-copy-actions.ts
index d038760..e5a6676 100644
--- a/src/store/collections/collection-copy-actions.ts
+++ b/src/store/collections/collection-copy-actions.ts
@@ -11,12 +11,14 @@ import { ServiceRepository } from '~/services/services';
 import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service';
 import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
 import { progressIndicatorActions } from "~/store/progress-indicator/progress-indicator-actions";
+import { initProjectsTreePicker } from '~/store/tree-picker/tree-picker-actions';
 
 export const COLLECTION_COPY_FORM_NAME = 'collectionCopyFormName';
 
 export const openCollectionCopyDialog = (resource: { name: string, uuid: string }) =>
     (dispatch: Dispatch) => {
         dispatch<any>(resetPickerProjectTree());
+        dispatch<any>(initProjectsTreePicker(COLLECTION_COPY_FORM_NAME));
         const initialData: CopyFormDialogData = { name: `Copy of: ${resource.name}`, ownerUuid: '', uuid: resource.uuid };
         dispatch<any>(initialize(COLLECTION_COPY_FORM_NAME, initialData));
         dispatch(dialogActions.OPEN_DIALOG({ id: COLLECTION_COPY_FORM_NAME, data: {} }));

commit a5f55ef0fa6bd61ba5678d5ccdbf26589c093212
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Nov 15 14:21:05 2018 +0100

    Add pickerId prop to DialogCopy
    
    Feature #14470
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/dialog-copy/dialog-copy.tsx b/src/views-components/dialog-copy/dialog-copy.tsx
index 4155415..24e91da 100644
--- a/src/views-components/dialog-copy/dialog-copy.tsx
+++ b/src/views-components/dialog-copy/dialog-copy.tsx
@@ -3,6 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
+import { memoize } from 'lodash/fp';
 import { InjectedFormProps, Field } from 'redux-form';
 import { WithDialogProps } from '~/store/dialog/with-dialog';
 import { FormDialog } from '~/components/form-dialog/form-dialog';
@@ -13,22 +14,25 @@ import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
 
 type CopyFormDialogProps = WithDialogProps<string> & InjectedFormProps<CopyFormDialogData>;
 
-export const DialogCopy = (props: CopyFormDialogProps) =>
+export const DialogCopy = (props: CopyFormDialogProps & { pickerId: string }) =>
     <FormDialog
         dialogTitle='Make a copy'
-        formFields={CopyDialogFields}
+        formFields={CopyDialogFields(props.pickerId)}
         submitLabel='Copy'
         {...props}
     />;
 
-const CopyDialogFields = () => <span>
-    <Field
-        name='name'
-        component={TextField}
-        validate={COPY_NAME_VALIDATION}
-        label="Enter a new name for the copy" />
-    <Field
-        name="ownerUuid"
-        component={ProjectTreePickerField}
-        validate={COPY_FILE_VALIDATION} />
-</span>;
+const CopyDialogFields = memoize((pickerId: string) =>
+    () =>
+        <span>
+            <Field
+                name='name'
+                component={TextField}
+                validate={COPY_NAME_VALIDATION}
+                label="Enter a new name for the copy" />
+            <Field
+                name="ownerUuid"
+                component={ProjectTreePickerField}
+                validate={COPY_FILE_VALIDATION} 
+                pickerId={pickerId}/>
+        </span>);

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list