[ARVADOS-WORKBENCH2] updated: 1.4.1-54-g634d3b05

Git user git at public.curoverse.com
Tue Oct 15 20:28:18 UTC 2019


Summary of changes:
 src/store/auth/auth-reducer.ts                     |  3 +-
 .../search-results-panel-view.tsx                  | 49 +++++++++++++---------
 2 files changed, 32 insertions(+), 20 deletions(-)

       via  634d3b05179258468f53427356b5218d97257072 (commit)
      from  bfd0188773272d62ac8b9196c3a445d83a5719aa (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 634d3b05179258468f53427356b5218d97257072
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Oct 15 16:19:12 2019 -0400

    15530: Ensure local cluster is also in store remoteHostsConfig
    
    Various code looks up or iterates over clusters in the federation
    using remoteHostsConfig.  Local cluster may get special handling but
    still works better if we make sure it is present in the object.

diff --git a/src/store/auth/auth-reducer.ts b/src/store/auth/auth-reducer.ts
index b4e73e1e..e932b97d 100644
--- a/src/store/auth/auth-reducer.ts
+++ b/src/store/auth/auth-reducer.ts
@@ -47,7 +47,8 @@ export const authReducer = (services: ServiceRepository) => (state = initialStat
                 localCluster: config.uuidPrefix,
                 remoteHosts: { ...config.remoteHosts, [config.uuidPrefix]: new URL(config.rootUrl).host },
                 homeCluster: config.loginCluster || config.uuidPrefix,
-                loginCluster: config.loginCluster
+                loginCluster: config.loginCluster,
+                remoteHostsConfig: { ...state.remoteHostsConfig, [config.uuidPrefix]: config }
             };
         },
         REMOTE_CLUSTER_CONFIG: ({ config }) => {
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 ca954217..59119403 100644
--- a/src/views/search-results-panel/search-results-panel-view.tsx
+++ b/src/views/search-results-panel/search-results-panel-view.tsx
@@ -23,6 +23,8 @@ import { getInitialResourceTypeFilters } from '~/store/resource-type-filters/res
 import { SearchResultsPanelProps } from "./search-results-panel";
 import { Link } from 'react-router-dom';
 import { Routes } from '~/routes/routes';
+import { StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core';
+import { ArvadosTheme } from '~/common/custom-theme';
 
 export enum SearchResultsPanelColumnNames {
     CLUSTER = "Cluster",
@@ -35,6 +37,14 @@ export enum SearchResultsPanelColumnNames {
     LAST_MODIFIED = "Last modified"
 }
 
+export type CssRules = 'siteManagerLink';
+
+const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
+    siteManagerLink: {
+        marginLeft: theme.spacing.unit * 2
+    }
+});
+
 export interface WorkflowPanelFilter extends DataTableFilterItem {
     type: ResourceKind | ContainerRequestState;
 }
@@ -100,22 +110,23 @@ export const searchResultsPanelColumns: DataColumns<string> = [
     }
 ];
 
-export const SearchResultsPanelView = (props: SearchResultsPanelProps) => {
-    const homeCluster = props.user.uuid.substr(0, 5);
-    const loggedIn = props.sessions.filter((ss) => ss.loggedIn);
-    return <DataExplorer
-        id={SEARCH_RESULTS_PANEL_ID}
-        onRowClick={props.onItemClick}
-        onRowDoubleClick={props.onItemDoubleClick}
-        onContextMenu={props.onContextMenu}
-        contextMenuColumn={false}
-        hideSearchInput
-        title={
-            <div>{(props.localCluster !== homeCluster && loggedIn.length === 1) ?
-                <span>Searching local cluster {props.localCluster} only.  To search multiple clusters, <a href={props.remoteHostsConfig[homeCluster] && props.remoteHostsConfig[homeCluster].workbench2Url}> start from your home Workbench.</a></span> :
-                <span>Searching clusters: {loggedIn.map((ss) => <span key={ss.clusterId}> {ss.clusterId}</span>)}</span>}
-                <Link to={Routes.SITE_MANAGER} style={{ marginLeft: "2em" }}>Site Manager</Link>
-            </div>
-        }
-    />;
-};
+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
+            id={SEARCH_RESULTS_PANEL_ID}
+            onRowClick={props.onItemClick}
+            onRowDoubleClick={props.onItemDoubleClick}
+            onContextMenu={props.onContextMenu}
+            contextMenuColumn={false}
+            hideSearchInput
+            title={
+                <div>{(props.localCluster !== homeCluster && loggedIn.length === 1) ?
+                    <span>Searching local cluster {props.localCluster} only.  To search multiple clusters, <a href={props.remoteHostsConfig[homeCluster] && props.remoteHostsConfig[homeCluster].workbench2Url}> start from your home Workbench.</a></span> :
+                    <span>Searching clusters: {loggedIn.map((ss) => <span key={ss.clusterId}> {ss.clusterId}</span>)}</span>}
+                    <Link to={Routes.SITE_MANAGER} className={props.classes.siteManagerLink}>Site Manager</Link>
+                </div>
+            }
+        />;
+    });

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list