[arvados-workbench2] updated: 2.6.0-40-g0486a1fe

git repository hosting git at public.arvados.org
Mon May 22 15:43:02 UTC 2023


Summary of changes:
 .../multiselectToolbar/MultiselectToolbar.tsx         | 19 +++++++++++++++----
 src/store/processes/processes-actions.ts              |  2 +-
 2 files changed, 16 insertions(+), 5 deletions(-)

       via  0486a1fe8e98fb613eceabfd745875ed2b0d4395 (commit)
      from  8671a18c6f71d9c57fa10d650c476cace51e70db (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 0486a1fe8e98fb613eceabfd745875ed2b0d4395
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon May 22 11:42:08 2023 -0400

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

diff --git a/src/components/multiselectToolbar/MultiselectToolbar.tsx b/src/components/multiselectToolbar/MultiselectToolbar.tsx
index 2409bc9c..fc036b29 100644
--- a/src/components/multiselectToolbar/MultiselectToolbar.tsx
+++ b/src/components/multiselectToolbar/MultiselectToolbar.tsx
@@ -86,7 +86,8 @@ export const MultiselectToolbar = connect(
     withStyles(styles)((props: MultiselectToolbarProps & WithStyles<CssRules>) => {
         // console.log(props);
         const { classes, actions, isVisible, checkedList } = props;
-        const currentResourceKinds = Array.from(new Set(selectedToArray(checkedList).map((element) => extractUuidKind(element))));
+
+        const currentResourceKinds = Array.from(selectedToKindSet(checkedList));
         const buttons = actions.filter((action) => currentResourceKinds.length && currentResourceKinds.every((kind) => action.relevantKinds.has(kind as ResourceKind)));
 
         return (
@@ -105,7 +106,7 @@ export const MultiselectToolbar = connect(
     })
 );
 
-function selectedToArray<T>(checkedList: TCheckedList): Array<string> {
+function selectedToArray(checkedList: TCheckedList): Array<string> {
     const arrayifiedSelectedList: Array<string> = [];
     for (const [key, value] of Object.entries(checkedList)) {
         if (value === true) {
@@ -115,6 +116,16 @@ function selectedToArray<T>(checkedList: TCheckedList): Array<string> {
     return arrayifiedSelectedList;
 }
 
+function selectedToKindSet(checkedList: TCheckedList): Set<string> {
+    const setifiedList = new Set<string>();
+    for (const [key, value] of Object.entries(checkedList)) {
+        if (value === true) {
+            setifiedList.add(extractUuidKind(key) as string);
+        }
+    }
+    return setifiedList;
+}
+
 function mapStateToProps(state: RootState) {
     const { isVisible, checkedList } = state.multiselect;
     return {
@@ -133,6 +144,6 @@ function mapDispatchToProps(dispatch: Dispatch) {
 }
 
 function removeMulti(dispatch: Dispatch, checkedList: TCheckedList): void {
-    const list: Array<string> = selectedToArray(checkedList);
-    dispatch<any>(list.length === 1 ? openRemoveProcessDialog(list[0]) : openRemoveManyProcessesDialog(list));
+    const selectedList: Array<string> = selectedToArray(checkedList);
+    dispatch<any>(selectedList.length === 1 ? openRemoveProcessDialog(selectedList[0]) : openRemoveManyProcessesDialog(selectedList));
 }
diff --git a/src/store/processes/processes-actions.ts b/src/store/processes/processes-actions.ts
index 8e481687..1d3be435 100644
--- a/src/store/processes/processes-actions.ts
+++ b/src/store/processes/processes-actions.ts
@@ -302,7 +302,7 @@ export const openRemoveManyProcessesDialog = (list: Array<string>) => (dispatch:
             id: REMOVE_MANY_PROCESSES_DIALOG,
             data: {
                 title: 'Remove processes permanently',
-                text: `Are you sure you want to remove all ${list.length} processes?`,
+                text: `Are you sure you want to remove these ${list.length} processes?`,
                 confirmButtonLabel: 'Remove',
                 list,
             },

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list