[ARVADOS-WORKBENCH2] updated: 1.3.1-450-g59000cfd

Git user git at public.curoverse.com
Mon May 13 20:10:49 UTC 2019


Summary of changes:
 src/components/data-explorer/data-explorer.tsx               |  4 +++-
 src/store/auth/auth-action.ts                                | 12 ++++++++++--
 src/views/search-results-panel/search-results-panel-view.tsx | 10 +++++++++-
 src/views/search-results-panel/search-results-panel.tsx      | 11 ++++++++++-
 4 files changed, 32 insertions(+), 5 deletions(-)

       via  59000cfd2934a50da18b5e70fd14f12abd020eb7 (commit)
      from  276af50119307b73027c939308ac6eabf4d86a8b (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 59000cfd2934a50da18b5e70fd14f12abd020eb7
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon May 13 16:10:05 2019 -0400

    15064: Tell users which clusters are being searched.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index 7c1f9045..9f727049 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -50,6 +50,7 @@ interface DataExplorerDataProps<T> {
     paperProps?: PaperProps;
     actions?: React.ReactNode;
     hideSearchInput?: boolean;
+    header?: React.ReactNode;
     paperKey?: string;
     currentItemUuid: string;
 }
@@ -84,11 +85,12 @@ export const DataExplorer = withStyles(styles)(
                 rowsPerPage, rowsPerPageOptions, onColumnToggle, searchValue, onSearch,
                 items, itemsAvailable, onRowClick, onRowDoubleClick, classes,
                 dataTableDefaultView, hideColumnSelector, actions, paperProps, hideSearchInput,
-                paperKey, fetchMode, currentItemUuid
+                paperKey, fetchMode, currentItemUuid, header
             } = this.props;
             return <Paper className={classes.root} {...paperProps} key={paperKey}>
                 {(!hideColumnSelector || !hideSearchInput) && <Toolbar className={classes.toolbar}>
                     <Grid container justify="space-between" wrap="nowrap" alignItems="center">
+                        {header && <div>{header}</div>}
                         <div className={classes.searchBox}>
                             {!hideSearchInput && <SearchInput
                                 value={searchValue}
diff --git a/src/store/auth/auth-action.ts b/src/store/auth/auth-action.ts
index 9d76e499..c06e064e 100644
--- a/src/store/auth/auth-action.ts
+++ b/src/store/auth/auth-action.ts
@@ -13,6 +13,7 @@ import { Session } from "~/models/session";
 import { getDiscoveryURL, Config } from '~/common/config';
 import { initSessions } from "~/store/auth/auth-action-session";
 import Axios from "axios";
+import { AxiosError } from "axios";
 
 export const authActions = unionize({
     SAVE_API_TOKEN: ofType<string>(),
@@ -58,8 +59,15 @@ export const initAuth = (config: Config) => (dispatch: Dispatch, getState: () =>
         dispatch<any>(initSessions(services.authService, config, user));
         dispatch<any>(getUserDetails()).then((user: User) => {
             dispatch(authActions.INIT({ user, token }));
-        }).catch(() => {
-            logout()(dispatch, getState, services);
+        }).catch((err: AxiosError) => {
+            console.log("error");
+            console.log(err);
+            if (err.response) {
+                // Bad token
+                if (err.response.status === 401) {
+                    logout()(dispatch, getState, services);
+                }
+            }
         });
     }
     Object.keys(config.remoteHosts).map((k) => {
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 368a0d64..06312799 100644
--- a/src/views/search-results-panel/search-results-panel-view.tsx
+++ b/src/views/search-results-panel/search-results-panel-view.tsx
@@ -21,6 +21,9 @@ import {
 } from '~/views-components/data-explorer/renderers';
 import { createTree } from '~/models/tree';
 import { getInitialResourceTypeFilters } from '~/store/resource-type-filters/resource-type-filters';
+import { User } from "~/models/user";
+import { Config } from '~/common/config';
+import { Session } from "~/models/session";
 
 export enum SearchResultsPanelColumnNames {
     CLUSTER = "Cluster",
@@ -35,6 +38,9 @@ export enum SearchResultsPanelColumnNames {
 
 export interface SearchResultsPanelDataProps {
     data: SearchBarAdvanceFormData;
+    user: User;
+    sessions: Session[];
+    remoteHostsConfig: { [key: string]: Config };
 }
 
 export interface SearchResultsPanelActionProps {
@@ -118,5 +124,7 @@ export const SearchResultsPanelView = (props: SearchResultsPanelProps) => {
         onRowDoubleClick={props.onItemDoubleClick}
         onContextMenu={props.onContextMenu}
         contextMenuColumn={true}
-        hideSearchInput />;
+        hideSearchInput
+        header={<p>Searching {props.sessions.filter((ss) => ss.loggedIn).map((ss) => <span key={ss.clusterId}> {ss.clusterId}</span>)}
+        </p>} />;
 };
diff --git a/src/views/search-results-panel/search-results-panel.tsx b/src/views/search-results-panel/search-results-panel.tsx
index 65999a5c..8fa0828b 100644
--- a/src/views/search-results-panel/search-results-panel.tsx
+++ b/src/views/search-results-panel/search-results-panel.tsx
@@ -10,6 +10,15 @@ import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-
 import { ResourceKind } from '~/models/resource';
 import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
 import { SearchResultsPanelView } from '~/views/search-results-panel/search-results-panel-view';
+import { RootState } from '~/store/store';
+
+const mapStateToProps = (rootState: RootState) => {
+    return {
+        user: rootState.auth.user,
+        sessions: rootState.auth.sessions,
+        remoteHostsConfig: rootState.auth.remoteHostsConfig
+    };
+};
 
 const mapDispatchToProps = (dispatch: Dispatch): SearchResultsPanelActionProps => ({
     onContextMenu: (event, resourceUuid) => {
@@ -34,4 +43,4 @@ const mapDispatchToProps = (dispatch: Dispatch): SearchResultsPanelActionProps =
     }
 });
 
-export const SearchResultsPanel = connect(null, mapDispatchToProps)(SearchResultsPanelView);
\ No newline at end of file
+export const SearchResultsPanel = connect(mapStateToProps, mapDispatchToProps)(SearchResultsPanelView);

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list