X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b70fb34feb137d347f1e9e9a85163981fe888622..df5bb74b46652b2e0a73a0e9ef2c09a63314e409:/src/views/search-results-panel/search-results-panel-view.tsx?ds=sidebyside

diff --git a/src/views/search-results-panel/search-results-panel-view.tsx b/src/views/search-results-panel/search-results-panel-view.tsx
index 6eac09fa..dae91bd0 100644
--- a/src/views/search-results-panel/search-results-panel-view.tsx
+++ b/src/views/search-results-panel/search-results-panel-view.tsx
@@ -11,11 +11,12 @@ import { ContainerRequestState } from '~/models/container-request';
 import { SEARCH_RESULTS_PANEL_ID } from '~/store/search-results-panel/search-results-panel-actions';
 import { DataExplorer } from '~/views-components/data-explorer/data-explorer';
 import {
-    ProcessStatus, ResourceCluster,
+    ResourceCluster,
     ResourceFileSize,
     ResourceLastModifiedDate,
     ResourceName,
     ResourceOwner,
+    ResourceStatus,
     ResourceType
 } from '~/views-components/data-explorer/renderers';
 import { createTree } from '~/models/tree';
@@ -29,7 +30,6 @@ import { ArvadosTheme } from '~/common/custom-theme';
 export enum SearchResultsPanelColumnNames {
     CLUSTER = "Cluster",
     NAME = "Name",
-    PROJECT = "Project",
     STATUS = "Status",
     TYPE = 'Type',
     OWNER = "Owner",
@@ -66,19 +66,12 @@ export const searchResultsPanelColumns: DataColumns<string> = [
         filters: createTree(),
         render: (uuid: string) => <ResourceName uuid={uuid} />
     },
-    {
-        name: SearchResultsPanelColumnNames.PROJECT,
-        selected: true,
-        configurable: true,
-        filters: createTree(),
-        render: uuid => <ResourceFileSize uuid={uuid} />
-    },
     {
         name: SearchResultsPanelColumnNames.STATUS,
         selected: true,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ProcessStatus uuid={uuid} />
+        render: uuid => <ResourceStatus uuid={uuid} />
     },
     {
         name: SearchResultsPanelColumnNames.TYPE,
@@ -114,8 +107,8 @@ export const searchResultsPanelColumns: DataColumns<string> = [
 export const SearchResultsPanelView = withStyles(styles, { withTheme: true })(
     (props: SearchResultsPanelProps & WithStyles<CssRules, true>) => {
         const homeCluster = props.user.uuid.substr(0, 5);
-        const loggedIn = props.sessions.filter((ss) => ss.loggedIn);
-        return <DataExplorer
+        const loggedIn = props.sessions.filter((ss) => ss.loggedIn && ss.userIsActive);
+        return <span data-cy='search-results'><DataExplorer
             id={SEARCH_RESULTS_PANEL_ID}
             onRowClick={props.onItemClick}
             onRowDoubleClick={props.onItemDoubleClick}
@@ -127,11 +120,12 @@ export const SearchResultsPanelView = withStyles(styles, { withTheme: true })(
                     {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].workbench2Url} style={{ textDecoration: 'none' }}> <ResourceCluster uuid={ss.clusterId} /></a></span>)}</span>}
+                            <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>;
     });
