[arvados-workbench2] updated: 2.6.0-70-g3bce3f7a

git repository hosting git at public.arvados.org
Mon Aug 28 18:10:12 UTC 2023


Summary of changes:
 src/store/workbench/workbench-actions.ts | 69 +++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 28 deletions(-)

       via  3bce3f7ad3a50e6e8c7da962691e53d45d808894 (commit)
       via  a1b1d0f1b3413681d26132f1ca06098ca8f1e8e3 (commit)
      from  19414f258a2a1e354e8721888dcdf68d937b0ec4 (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 3bce3f7ad3a50e6e8c7da962691e53d45d808894
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Aug 28 14:10:08 2023 -0400

    15768: multimove processes works Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index fb335782..9b928ce3 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -528,26 +528,39 @@ export const updateProcess = (data: processUpdateActions.ProcessUpdateFormDialog
 };
 
 export const moveProcess = (data: MoveToFormDialogData) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-    console.log("PROCESSS_DATA: ", data);
-    try {
-        const process = await dispatch<any>(processMoveActions.moveProcess(data));
-        dispatch<any>(updateResources([process]));
-        dispatch<any>(reloadProjectMatchingUuid([process.ownerUuid]));
-        dispatch(
-            snackbarActions.OPEN_SNACKBAR({
-                message: "Process has been moved.",
-                hideDuration: 2000,
-                kind: SnackbarKind.SUCCESS,
-            })
-        );
-    } catch (e) {
-        dispatch(
-            snackbarActions.OPEN_SNACKBAR({
-                message: e.message,
-                hideDuration: 2000,
-                kind: SnackbarKind.ERROR,
-            })
-        );
+    const itemsToMove: string[] = selectedToArray(getState().multiselect.checkedList);
+    //if no items in checkedlist, default to normal context menu behavior
+    if (!itemsToMove.length) itemsToMove.push(data.uuid);
+
+    for (const uuid of itemsToMove) {
+        await moveSingleProcess(uuid);
+    }
+
+    async function moveSingleProcess(uuid) {
+        const originalItem = getResource(uuid)(getState().resources) as Resource & { name: string };
+        if (originalItem.kind === ResourceKind.PROCESS) {
+            try {
+                const oldProcess: MoveToFormDialogData = { name: originalItem.name, uuid: originalItem.uuid, ownerUuid: data.ownerUuid };
+                const process = await dispatch<any>(processMoveActions.moveProcess(oldProcess));
+                dispatch<any>(updateResources([process]));
+                dispatch<any>(reloadProjectMatchingUuid([process.ownerUuid]));
+                dispatch(
+                    snackbarActions.OPEN_SNACKBAR({
+                        message: "Process has been moved.",
+                        hideDuration: 2000,
+                        kind: SnackbarKind.SUCCESS,
+                    })
+                );
+            } catch (e) {
+                dispatch(
+                    snackbarActions.OPEN_SNACKBAR({
+                        message: e.message,
+                        hideDuration: 2000,
+                        kind: SnackbarKind.ERROR,
+                    })
+                );
+            }
+        }
     }
 };
 

commit a1b1d0f1b3413681d26132f1ca06098ca8f1e8e3
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Aug 28 13:47:12 2023 -0400

    15768: clarified naming patterns Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index 5101ab40..fb335782 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -279,21 +279,21 @@ export const createProject = (data: projectCreateActions.ProjectCreateFormDialog
 };
 
 export const moveProject = (data: MoveToFormDialogData) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-    const projectsToMove: string[] = selectedToArray(getState().multiselect.checkedList);
+    const itemsToMove: string[] = selectedToArray(getState().multiselect.checkedList);
     //if no items in checkedlist, default to normal context menu behavior
-    if (!projectsToMove.length) projectsToMove.push(data.uuid);
+    if (!itemsToMove.length) itemsToMove.push(data.uuid);
     const sourceUuid = getResource(data.uuid)(getState().resources)?.ownerUuid;
     const destinationUuid = data.ownerUuid;
 
-    for (const projectUuid of projectsToMove) {
-        await moveSingleProject(projectUuid);
+    for (const uuid of itemsToMove) {
+        await moveSingleProject(uuid);
     }
 
-    async function moveSingleProject(projectUuid) {
-        const originalProject = getResource(projectUuid)(getState().resources) as Resource & { name: string };
-        if (originalProject.kind === ResourceKind.PROJECT) {
+    async function moveSingleProject(uuid) {
+        const originalItem = getResource(uuid)(getState().resources) as Resource & { name: string };
+        if (originalItem.kind === ResourceKind.PROJECT) {
             try {
-                const oldProject: MoveToFormDialogData = { name: originalProject.name, uuid: originalProject.uuid, ownerUuid: data.ownerUuid };
+                const oldProject: MoveToFormDialogData = { name: originalItem.name, uuid: originalItem.uuid, ownerUuid: data.ownerUuid };
                 const oldOwnerUuid = oldProject ? oldProject.ownerUuid : "";
                 const movedProject = await dispatch<any>(projectMoveActions.moveProject(oldProject));
                 if (movedProject) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list