-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
404da65
commit 5797f21
Showing
2 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import React from 'react'; | ||
import { Clipboard } from '../Clipboard'; | ||
import { HideCredential } from '../Hide'; | ||
import { ModalBody } from '../Modal'; | ||
import Table, * as T from '../TableKeyValue'; | ||
import styled from 'styled-components'; | ||
import { Box, Button, CopyButton } from '@scality/core-ui/dist/next'; | ||
import { CustomModal } from './VeeamTable'; | ||
import { Stack, Wrap } from '@scality/core-ui/dist/spacing'; | ||
import { Banner, Icon } from '@scality/core-ui'; | ||
import { spacing } from '@scality/core-ui/dist/style/theme'; | ||
import { useHistory } from 'react-router-dom'; | ||
|
||
const StyledCopybutton = styled(CopyButton)({ | ||
height: '1.914rem', | ||
width: '11rem', | ||
}); | ||
|
||
export const VeeamSummary = ({ | ||
secretKeyModal, | ||
setSecretKeyModal, | ||
}: { | ||
secretKeyModal: boolean; | ||
setSecretKeyModal: (value: boolean) => void; | ||
}) => { | ||
const history = useHistory(); | ||
|
||
return ( | ||
<CustomModal | ||
isOpen={secretKeyModal} | ||
title="Veeam Repository preparation summary" | ||
footer={ | ||
<Wrap> | ||
<p></p> | ||
<Stack> | ||
<p></p> | ||
<Button | ||
variant="primary" | ||
label={'Continue'} | ||
onClick={() => { | ||
setSecretKeyModal(false); | ||
history.push('/'); | ||
}} | ||
/> | ||
</Stack> | ||
</Wrap> | ||
} | ||
> | ||
<ModalBody> | ||
<Banner icon={<Icon name="Exclamation-triangle" />} variant="warning"> | ||
A Root user Access key ID and its Secret Access key have been created.{' '} | ||
<br /> | ||
The Secret Access key cannot be retrieved afterwards, so make sure to | ||
keep and secure it now. <br /> | ||
You will be able to create new Access keys at any time. | ||
</Banner> | ||
<Table | ||
style={{ | ||
marginTop: spacing.sp16, | ||
}} | ||
> | ||
<T.Body> | ||
<T.Row> | ||
<T.Key> Account name </T.Key> | ||
<T.Value>veeam</T.Value> | ||
</T.Row> | ||
<T.Row> | ||
<T.Key> Access key ID </T.Key> | ||
<T.Value>JLVWC9DX45XLY0K9PVEX</T.Value> | ||
<T.ExtraCell> | ||
{' '} | ||
<Clipboard text={'JLVWC9DX45XLY0K9PVEX'} />{' '} | ||
</T.ExtraCell> | ||
</T.Row> | ||
<T.Row> | ||
<T.Key> Secret Access key </T.Key> | ||
<T.Value> | ||
{' '} | ||
<HideCredential credentials={'EPJGOdLwTK'} />{' '} | ||
</T.Value> | ||
<T.ExtraCell> | ||
{' '} | ||
<Clipboard text={'EPJGOdLwTK'} />{' '} | ||
</T.ExtraCell> | ||
</T.Row> | ||
</T.Body> | ||
</Table> | ||
<Box | ||
display={'flex'} | ||
style={{ alignItems: 'end', flexDirection: 'column' }} | ||
> | ||
<StyledCopybutton | ||
textToCopy={`Username\tveeam\nAccess key ID\tJLVWC9DX45XLY0K9PVEX\nSecret Access key\tEPJGOdLwTK`} | ||
label="to Clipboard" | ||
variant="outline" | ||
/> | ||
</Box> | ||
</ModalBody> | ||
</CustomModal> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters