Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti@veritasgenetics.com>
services.linkAccountService.saveAccountToLink(accountToLink);
const auth = getState().auth;
dispatch(logout());
services.linkAccountService.saveAccountToLink(accountToLink);
const auth = getState().auth;
dispatch(logout());
- dispatch(login(auth.localCluster, auth.remoteHosts[auth.homeCluster]));
+ dispatch(login(auth.localCluster, auth.homeCluster, auth.remoteHosts));
};
export const getAccountLinkData = () =>
};
export const getAccountLinkData = () =>
import { DataTableFetchMode } from "~/components/data-table/data-table";
import { loadPublicFavoritePanel, publicFavoritePanelActions } from '~/store/public-favorites-panel/public-favorites-action';
import { publicFavoritePanelColumns } from '~/views/public-favorites-panel/public-favorites-panel';
import { DataTableFetchMode } from "~/components/data-table/data-table";
import { loadPublicFavoritePanel, publicFavoritePanelActions } from '~/store/public-favorites-panel/public-favorites-action';
import { publicFavoritePanelColumns } from '~/views/public-favorites-panel/public-favorites-panel';
-import { USER_LINK_ACCOUNT_KEY } from '~/services/link-account-service/link-account-service';
import { loadCollectionsContentAddressPanel, collectionsContentAddressActions } from '~/store/collections-content-address-panel/collections-content-address-panel-actions';
import { collectionContentAddressPanelColumns } from '~/views/collection-content-address-panel/collection-content-address-panel';
import { loadCollectionsContentAddressPanel, collectionsContentAddressActions } from '~/store/collections-content-address-panel/collections-content-address-panel-actions';
import { collectionContentAddressPanelColumns } from '~/views/collection-content-address-panel/collection-content-address-panel';
};
export const loadWorkbench = () =>
};
export const loadWorkbench = () =>
- async (dispatch: Dispatch, getState: () => RootState) => {
+ async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN));
const { auth, router } = getState();
const { user } = auth;
dispatch(progressIndicatorActions.START_WORKING(WORKBENCH_LOADING_SCREEN));
const { auth, router } = getState();
const { user } = auth;
dispatch(apiClientAuthorizationsActions.SET_COLUMNS({ columns: apiClientAuthorizationPanelColumns }));
dispatch(collectionsContentAddressActions.SET_COLUMNS({ columns: collectionContentAddressPanelColumns }));
dispatch(apiClientAuthorizationsActions.SET_COLUMNS({ columns: apiClientAuthorizationPanelColumns }));
dispatch(collectionsContentAddressActions.SET_COLUMNS({ columns: collectionContentAddressPanelColumns }));
- if (sessionStorage.getItem(USER_LINK_ACCOUNT_KEY)) {
+ if (services.linkAccountService.getAccountToLink()) {
dispatch(linkAccountPanelActions.HAS_SESSION_DATA());
}
dispatch(linkAccountPanelActions.HAS_SESSION_DATA());
}
this.props.dispatch(initSessions(this.props.authService, this.props.config, user));
}).finally(() => {
if (loadMainApp) {
this.props.dispatch(initSessions(this.props.authService, this.props.config, user));
}).finally(() => {
if (loadMainApp) {
- if (this.props.dispatch(getAccountLinkData())) {
- this.props.dispatch(navigateToLinkAccount);
- }
- else {
- this.props.dispatch(navigateToRootProject);
- }
+ if (this.props.dispatch(getAccountLinkData())) {
+ this.props.dispatch(navigateToLinkAccount);
+ }
+ else {
+ this.props.dispatch(navigateToRootProject);
+ }