Skip to content

Commit

Permalink
Add logout button, remove close button
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemcdermott committed Sep 29, 2020
1 parent cce5281 commit 97ab1c1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions awx/ui_next/src/components/AppContainer/AppContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const MAX_TIMEOUT = 2 ** (32 - 1) - 1;
// before the user is logged out. Increasing this number (up to
// the total session time, which is 1800s by default) will cause
// the session timeout warning to display sooner.
const SESSION_WARNING_DURATION = 10;
const SESSION_WARNING_DURATION = 1795;

const PageHeader = styled(PFPageHeader)`
& .pf-c-page__header-brand-link {
Expand Down Expand Up @@ -225,15 +225,18 @@ function AppContainer({ i18n, navRouteConfig = [], children }) {
<AlertModal
title={i18n._(t`Your session is about to expire`)}
isOpen={timeoutWarning && sessionTimeout > 0}
onClose={handleLogout}
showClose={false}
variant="warning"
actions={[
<Button
key="confirm"
variant="primary"
onClick={handleSessionContinue}
>
Continue
{i18n._(t`Continue`)}
</Button>,
<Button key="logout" variant="secondary" onClick={handleLogout}>
{i18n._(t`Logout`)}
</Button>,
]}
>
Expand Down

0 comments on commit 97ab1c1

Please sign in to comment.