16679: Drops TokeLifetime in favor of IdleTimeout on token storage decision.
[arvados-workbench2.git] / src / views / main-panel / main-panel.tsx
index 5bf03da3986afbe73c8999c43cd119f438652785..edbf5cc4c7886f6473ff6a7d28c31c91d29ae283 100644 (file)
@@ -4,6 +4,7 @@
 
 import { RootState } from '~/store/store';
 import { connect } from 'react-redux';
+import parse from 'parse-duration';
 import { MainPanelRoot, MainPanelRootDataProps } from '~/views/main-panel/main-panel-root';
 import { isSystemWorking } from '~/store/progress-indicator/progress-indicator-reducer';
 import { isWorkbenchLoading } from '~/store/workbench/workbench-actions';
@@ -18,7 +19,9 @@ const mapStateToProps = (state: RootState): MainPanelRootDataProps => {
         buildInfo: state.appInfo.buildInfo,
         uuidPrefix: state.auth.localCluster,
         isNotLinking: state.linkAccountPanel.status === LinkAccountPanelStatus.NONE || state.linkAccountPanel.status === LinkAccountPanelStatus.INITIAL,
-        isLinkingPath:  state.router.location ? matchLinkAccountRoute(state.router.location.pathname) !== null : false
+        isLinkingPath: state.router.location ? matchLinkAccountRoute(state.router.location.pathname) !== null : false,
+        siteBanner: state.auth.config.clusterConfig.Workbench.SiteName,
+        sessionIdleTimeout: parse(state.auth.config.clusterConfig.Workbench.IdleTimeout, 's') || 0
     };
 };