[arvados] created: 2.7.0-5932-g226ebf4498

git repository hosting git at public.arvados.org
Wed Jan 31 20:18:19 UTC 2024


        at  226ebf449857fe00901610e1831b32f3801e9e22 (commit)


commit 226ebf449857fe00901610e1831b32f3801e9e22
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Jan 31 15:17:39 2024 -0500

    21370: Remove workflows/container requests from federated search
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/workbench2/src/store/resource-type-filters/resource-type-filters.ts b/services/workbench2/src/store/resource-type-filters/resource-type-filters.ts
index e1448f640b..2306f4a8e0 100644
--- a/services/workbench2/src/store/resource-type-filters/resource-type-filters.ts
+++ b/services/workbench2/src/store/resource-type-filters/resource-type-filters.ts
@@ -93,6 +93,24 @@ export const getInitialResourceTypeFilters = pipe(
 
 );
 
+// Using pipe() with more than 7 arguments makes the return type be 'any',
+// causing compile issues.
+export const getInitialSearchTypeFilters = pipe(
+    (): DataTableFilters => createTree<DataTableFilterItem>(),
+    pipe(
+        initFilter(ObjectTypeFilter.PROJECT, '', true, true),
+        initFilter(GroupTypeFilter.PROJECT, ObjectTypeFilter.PROJECT),
+        initFilter(GroupTypeFilter.FILTER_GROUP, ObjectTypeFilter.PROJECT),
+    ),
+    pipe(
+        initFilter(ObjectTypeFilter.COLLECTION, '', true, true),
+        initFilter(CollectionTypeFilter.GENERAL_COLLECTION, ObjectTypeFilter.COLLECTION),
+        initFilter(CollectionTypeFilter.OUTPUT_COLLECTION, ObjectTypeFilter.COLLECTION),
+        initFilter(CollectionTypeFilter.INTERMEDIATE_COLLECTION, ObjectTypeFilter.COLLECTION, false),
+        initFilter(CollectionTypeFilter.LOG_COLLECTION, ObjectTypeFilter.COLLECTION, false),
+    ),
+);
+
 export const getInitialProcessTypeFilters = pipe(
     (): DataTableFilters => createTree<DataTableFilterItem>(),
     initFilter(ProcessTypeFilter.MAIN_PROCESS),
diff --git a/services/workbench2/src/views/search-results-panel/search-results-panel-view.tsx b/services/workbench2/src/views/search-results-panel/search-results-panel-view.tsx
index d9b9002e3e..e9693b50e5 100644
--- a/services/workbench2/src/views/search-results-panel/search-results-panel-view.tsx
+++ b/services/workbench2/src/views/search-results-panel/search-results-panel-view.tsx
@@ -21,7 +21,7 @@ import {
 } from 'views-components/data-explorer/renderers';
 import servicesProvider from 'common/service-provider';
 import { createTree } from 'models/tree';
-import { getInitialResourceTypeFilters } from 'store/resource-type-filters/resource-type-filters';
+import { getInitialSearchTypeFilters } from 'store/resource-type-filters/resource-type-filters';
 import { SearchResultsPanelProps } from "./search-results-panel";
 import { Routes } from 'routes/routes';
 import { Link } from 'react-router-dom';
@@ -69,7 +69,7 @@ export const searchResultsPanelColumns: DataColumns<string, GroupContentsResourc
         name: SearchResultsPanelColumnNames.NAME,
         selected: true,
         configurable: true,
-        sort: {direction: SortDirection.NONE, field: "name"},
+        sort: { direction: SortDirection.NONE, field: "name" },
         filters: createTree(),
         render: (uuid: string) => <ResourceName uuid={uuid} />
     },
@@ -84,7 +84,7 @@ export const searchResultsPanelColumns: DataColumns<string, GroupContentsResourc
         name: SearchResultsPanelColumnNames.TYPE,
         selected: true,
         configurable: true,
-        filters: getInitialResourceTypeFilters(),
+        filters: getInitialSearchTypeFilters(),
         render: (uuid: string) => <ResourceType uuid={uuid} />,
     },
     {
@@ -105,7 +105,7 @@ export const searchResultsPanelColumns: DataColumns<string, GroupContentsResourc
         name: SearchResultsPanelColumnNames.LAST_MODIFIED,
         selected: true,
         configurable: true,
-        sort: {direction: SortDirection.DESC, field: "modifiedAt"},
+        sort: { direction: SortDirection.DESC, field: "modifiedAt" },
         filters: createTree(),
         render: uuid => <ResourceLastModifiedDate uuid={uuid} />
     }
@@ -130,8 +130,8 @@ export const SearchResultsPanelView = withStyles(styles, { withTheme: true })(
                         const clusterId = searchUuid.split('-')[0];
                         const serviceType = camelCase(itemKind?.replace('arvados#', ''));
                         const service = Object.values(servicesProvider.getServices())
-                            .filter(({resourceType}) => !!resourceType)
-                            .find(({resourceType}) => camelCase(resourceType).indexOf(serviceType) > -1);
+                            .filter(({ resourceType }) => !!resourceType)
+                            .find(({ resourceType }) => camelCase(resourceType).indexOf(serviceType) > -1);
                         const sessions = getSearchSessions(clusterId, props.sessions);
 
                         if (sessions.length > 0) {
@@ -150,35 +150,35 @@ export const SearchResultsPanelView = withStyles(styles, { withTheme: true })(
                 }
             })();
 
-        // eslint-disable-next-line react-hooks/exhaustive-deps
+            // eslint-disable-next-line react-hooks/exhaustive-deps
         }, [selectedItem]);
 
         const onItemClick = useCallback((uuid) => {
             setSelectedItem(uuid);
             props.onItemClick(uuid);
-        // eslint-disable-next-line react-hooks/exhaustive-deps
-        },[props.onItemClick]);
+            // eslint-disable-next-line react-hooks/exhaustive-deps
+        }, [props.onItemClick]);
 
         return <span data-cy='search-results' className={props.classes.searchResults}>
             <DataExplorer
-            id={SEARCH_RESULTS_PANEL_ID}
-            onRowClick={onItemClick}
-            onRowDoubleClick={props.onItemDoubleClick}
-            onContextMenu={props.onContextMenu}
-            contextMenuColumn={false}
-            elementPath={`/ ${itemPath.reverse().join(' / ')}`}
-            hideSearchInput
-            title={
-                <div>
-                    {loggedIn.length === 1 ?
-                        <span>Searching local cluster <ResourceCluster uuid={props.localCluster} /></span>
-                        : <span>Searching clusters: {loggedIn.map((ss) => <span key={ss.clusterId}>
-                            <a href={props.remoteHostsConfig[ss.clusterId] && props.remoteHostsConfig[ss.clusterId].workbench2Url} style={{ textDecoration: 'none' }}> <ResourceCluster uuid={ss.clusterId} /></a>
-                        </span>)}</span>}
-                    {loggedIn.length === 1 && props.localCluster !== homeCluster ?
-                        <span>To search multiple clusters, <a href={props.remoteHostsConfig[homeCluster] && props.remoteHostsConfig[homeCluster].workbench2Url}> start from your home Workbench.</a></span>
-                        : <span style={{ marginLeft: "2em" }}>Use <Link to={Routes.SITE_MANAGER} >Site Manager</Link> to manage which clusters will be searched.</span>}
-                </div >
-            }
-        /></span>;
+                id={SEARCH_RESULTS_PANEL_ID}
+                onRowClick={onItemClick}
+                onRowDoubleClick={props.onItemDoubleClick}
+                onContextMenu={props.onContextMenu}
+                contextMenuColumn={false}
+                elementPath={`/ ${itemPath.reverse().join(' / ')}`}
+                hideSearchInput
+                title={
+                    <div>
+                        {loggedIn.length === 1 ?
+                            <span>Searching local cluster <ResourceCluster uuid={props.localCluster} /></span>
+                            : <span>Searching clusters: {loggedIn.map((ss) => <span key={ss.clusterId}>
+                                <a href={props.remoteHostsConfig[ss.clusterId] && props.remoteHostsConfig[ss.clusterId].workbench2Url} style={{ textDecoration: 'none' }}> <ResourceCluster uuid={ss.clusterId} /></a>
+                            </span>)}</span>}
+                        {loggedIn.length === 1 && props.localCluster !== homeCluster ?
+                            <span>To search multiple clusters, <a href={props.remoteHostsConfig[homeCluster] && props.remoteHostsConfig[homeCluster].workbench2Url}> start from your home Workbench.</a></span>
+                            : <span style={{ marginLeft: "2em" }}>Use <Link to={Routes.SITE_MANAGER} >Site Manager</Link> to manage which clusters will be searched.</span>}
+                    </div >
+                }
+            /></span>;
     });

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list