200085: Added changes to share dialog layout
[arvados-workbench2.git] / src / index.tsx
index d00095411f9db927b5617e7d788031226b75fe51..244d1387307778de1f0c4ccd01412bdc85797ccd 100644 (file)
@@ -66,6 +66,7 @@ import { workflowActionSet } from 'views-components/context-menu/action-sets/wor
 import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions";
 import { openNotFoundDialog } from './store/not-found-panel/not-found-panel-action';
 import { storeRedirects } from './common/redirect-to';
+import { searchResultsActionSet } from 'views-components/context-menu/action-sets/search-results-action-set';
 
 console.log(`Starting arvados [${getBuildInfo()}]`);
 
@@ -106,6 +107,7 @@ addMenuActionSet(ContextMenuKind.FROZEN_PROJECT_ADMIN, frozenAdminActionSet);
 addMenuActionSet(ContextMenuKind.FILTER_GROUP_ADMIN, filterGroupAdminActionSet);
 addMenuActionSet(ContextMenuKind.PERMISSION_EDIT, permissionEditActionSet);
 addMenuActionSet(ContextMenuKind.WORKFLOW, workflowActionSet);
+addMenuActionSet(ContextMenuKind.SEARCH_RESULTS, searchResultsActionSet);
 
 storeRedirects();
 
@@ -130,7 +132,8 @@ fetchConfig()
                     if (error.status === 404) {
                         store.dispatch(openNotFoundDialog());
                     } else if (error.status === 401 && error.errors[0].indexOf("Not logged in") > -1) {
-                        store.dispatch(logout());
+                        // Catch auth errors when navigating and redirect to login preserving url location
+                        store.dispatch(logout(false, true));
                     } else {
                         store.dispatch(snackbarActions.OPEN_SNACKBAR({
                             message: `${error.errors