-
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
77c1eb9
commit 6188ee1
Showing
6 changed files
with
413 additions
and
6 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
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
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
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,153 @@ | ||
import { Icon, Link, spacing, Stack, Text } from '@scality/core-ui'; | ||
import React from 'react'; | ||
import { useTheme } from 'styled-components'; | ||
|
||
type CardProps = { | ||
application?: string; | ||
logo: JSX.Element; | ||
name: string; | ||
selected?: boolean; | ||
onChange?: (value: React.SetStateAction<string>) => void; | ||
}; | ||
|
||
type ManualCardProps = { | ||
application?: string; | ||
logo: JSX.Element; | ||
link: string; | ||
}; | ||
|
||
export const MoreToCome = (props: { disabled?: boolean }) => { | ||
const { disabled } = props; | ||
return ( | ||
<div | ||
style={{ | ||
borderRadius: spacing.f8, | ||
display: 'flex', | ||
alignItems: 'flex-end', | ||
backgroundColor: disabled | ||
? 'rgba(27, 27, 39, 0.5)' | ||
: 'rgba(27, 27, 39, 1)', | ||
cursor: 'not-allowed', | ||
height: '4.5rem', | ||
padding: spacing.r20, | ||
}} | ||
> | ||
<Text color="textPrimary">More to come...</Text> | ||
</div> | ||
); | ||
}; | ||
|
||
const cardContainerStyle = { | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
gap: spacing.r32, | ||
padding: spacing.r20, | ||
height: '4.5rem', | ||
alignItems: 'flex-start', | ||
borderRadius: '8px', | ||
}; | ||
|
||
const CardContent = (props: { logo: JSX.Element; application: string }) => { | ||
const { logo, application } = props; | ||
return ( | ||
<Stack | ||
direction="vertical" | ||
gap="r8" | ||
style={{ | ||
paddingTop: '0.5rem', | ||
}} | ||
> | ||
{logo} | ||
{application && ( | ||
<Text color="textPrimary" isEmphazed variant="Smaller"> | ||
{application} | ||
</Text> | ||
)} | ||
</Stack> | ||
); | ||
}; | ||
|
||
export const ManualISVCard = (props: ManualCardProps) => { | ||
const theme = useTheme(); | ||
const { logo, application, link } = props; | ||
return ( | ||
<div | ||
style={{ | ||
position: 'relative', | ||
clipPath: 'polygon(0 0, 100% 0, 100% 100%, 0 100%)', | ||
borderRadius: '8px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
...cardContainerStyle, | ||
backgroundColor: theme.backgroundLevel4, | ||
opacity: 0.5, | ||
}} | ||
> | ||
<CardContent logo={logo} application={application}></CardContent> | ||
</div> | ||
<Link | ||
href={link} | ||
target="_blank" | ||
style={{ | ||
position: 'absolute', | ||
bottom: spacing.r10, | ||
right: spacing.r24, | ||
}} | ||
> | ||
Learn more <Icon name="External-link"></Icon> | ||
</Link> | ||
{/* <div | ||
style={{ | ||
position: 'absolute', | ||
cursor: 'default', | ||
top: '1rem', | ||
right: '-3rem', | ||
color: 'white', | ||
width: '10rem', | ||
textAlign: 'center', | ||
paddingBlock: spacing.r8, | ||
backgroundColor: theme.infoSecondary, | ||
transform: 'rotate(45deg)', | ||
boxShadow: '0px 4px 4px 0px rgba(0,0,0,0.5)', | ||
}} | ||
> | ||
<Text color="textPrimary" variant="Smaller"> | ||
Manual | ||
</Text> | ||
</div> */} | ||
</div> | ||
); | ||
}; | ||
|
||
export const CardISV = (props: CardProps) => { | ||
const theme = useTheme(); | ||
const { logo, name, application, onChange, selected } = props; | ||
logo.props.height = 20; | ||
return ( | ||
<label | ||
htmlFor={`isv-${name}`} | ||
style={{ | ||
...cardContainerStyle, | ||
cursor: 'pointer', | ||
backgroundColor: selected ? theme.highlight : theme.backgroundLevel4, | ||
}} | ||
> | ||
<CardContent logo={logo} application={application} /> | ||
|
||
<input | ||
style={{ | ||
flex: 'flex-start', | ||
}} | ||
type="radio" | ||
name="isv" | ||
value={name} | ||
id={`isv-${name}`} | ||
checked={selected} | ||
onChange={() => onChange(name)} | ||
/> | ||
</label> | ||
); | ||
}; |
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,124 @@ | ||
import { CommvaultLogo } from '../Logo/CommvaultLogo'; | ||
import KastenLogo from '../Logo/KastenLogo'; | ||
import { VEEAM_BACKUP_REPLICATION } from '../Veeam/VeeamConstants'; | ||
import HycuLogo from '../Logo/HycuLogo'; | ||
import CteraLogo from '../Logo/CteraLogo'; | ||
import RubrikLogo from '../Logo/RubrikLogo'; | ||
import VeeamLogo from '../Logo/VeeamLogo'; | ||
import SplunkLogo from '../Logo/SplunkLogo'; | ||
import ZertoLogo from '../Logo/ZertoLogo'; | ||
import VeritasLogo from '../Logo/VeritasLogo'; | ||
import CohesityLogo from '../Logo/CohesityLogo'; | ||
|
||
export const ISVList = [ | ||
{ | ||
id: 'veeam', | ||
|
||
name: 'Veeam', | ||
logo: <VeeamLogo />, | ||
type: VEEAM_BACKUP_REPLICATION, | ||
}, | ||
// { | ||
// name: 'Veeam VBO', | ||
// logo: <VeeamLogo />, | ||
// type: 'Veeam Backup for Microsoft 365', | ||
// }, | ||
|
||
{ id: 'commvault', name: 'Commvault', logo: <CommvaultLogo /> }, | ||
]; | ||
|
||
export type ISVConfigurationProps = { | ||
application: 'Veeam' | 'Commvault'; | ||
bucketTag: 'Veeam' | 'Commvault'; | ||
logo: JSX.Element; | ||
fieldOverrides: [ | ||
{ | ||
name: string; | ||
label?: string; | ||
tooltip?: JSX.Element; | ||
helpText?: string; | ||
placeholder?: string; | ||
additionnal?: JSX.Element[]; | ||
}, | ||
]; | ||
}; | ||
type ISVManual = { | ||
name: string; | ||
application?: string; | ||
documentationLink: string; | ||
logo: JSX.Element; | ||
}; | ||
|
||
export const ISVManualList: ISVManual[] = [ | ||
{ | ||
name: 'Kasten', | ||
application: 'Veeam Kasten', | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.1/partner_applications/validated_designs/kasten.html', | ||
logo: <KastenLogo />, | ||
}, | ||
{ | ||
name: 'Hycu', | ||
logo: <HycuLogo />, | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.1/partner_applications/validated_designs/hycu_enterprise-clouds.html', | ||
}, | ||
{ | ||
name: 'Ctera', | ||
logo: <CteraLogo />, | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.1/partner_applications/validated_designs/ctera/index.html', | ||
}, | ||
{ | ||
name: 'Rubrik', | ||
logo: <RubrikLogo />, | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.1/partner_applications/validated_designs/rubrik_security_cloud.html', | ||
}, | ||
{ | ||
name: 'Splunk', | ||
logo: <SplunkLogo />, | ||
//TODO update the link once the documentation is available | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.2/partner_applications/validated_designs/index.html', | ||
}, | ||
{ | ||
name: 'Cohesity', | ||
logo: <CohesityLogo />, | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.2/partner_applications/validated_designs/cohesity_cloud_archive.html', | ||
}, | ||
{ | ||
name: 'Veritas', | ||
logo: <VeritasLogo />, | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.2/partner_applications/validated_designs/veritas_netbackup.html', | ||
}, | ||
{ | ||
name: 'Zerto', | ||
logo: <ZertoLogo />, | ||
documentationLink: | ||
'https://documentation.scality.com/Artesca/3.0.2/partner_applications/validated_designs/zerto/zerto.html', | ||
}, | ||
]; | ||
|
||
// Future implementation type | ||
export type FutureConfigurationProps = { | ||
// General isv name | ||
name: 'Veeam' | 'Commvault'; | ||
// Application of the isv | ||
// An isv can have multiple applications | ||
application: string; | ||
bucketTag: 'Veeam' | 'Commvault'; | ||
logo: Element; | ||
fieldOverrides: [ | ||
{ | ||
name: string; | ||
lable?: string; | ||
tooltip?: Element; | ||
helpText?: string; | ||
placeholder?: string; | ||
additionnal?: Element[]; | ||
}, | ||
]; | ||
}; |
Oops, something went wrong.