Skip to content

Commit

Permalink
add veeam vbo in modal choice
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Jan 29, 2025
1 parent e08edde commit 4ecef8f
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/react/ISV/modules/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ISVPlatformConfig } from '../types';
import styled from 'styled-components';
import Joi from '@hapi/joi';
import { Commvault } from './commvault';
import { VeeamVBO } from './veeam-vbo';

export const ListItem = styled.li`
padding: 0.5rem;
Expand All @@ -21,6 +22,6 @@ export const checkDecimals = (value: number, helpers: Joi.CustomHelpers) => {
return value;
};

export const isvModules: ISVPlatformConfig[] = [Veeam, Commvault];
export const isvModules: ISVPlatformConfig[] = [Veeam, Commvault, VeeamVBO];

export type { ISVPlatformConfig };
162 changes: 162 additions & 0 deletions src/react/ISV/modules/veeam-vbo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
import { ISVPlatformConfig } from '../../types';
import { VeeamLogo } from '../../../ui-elements/Veeam/VeeamLogo';
import Joi from '@hapi/joi';
import { Text } from '@scality/core-ui';
import { checkDecimals, ListItem } from '../index';
import { accountNameValidationSchema } from '../../../account/AccountCreate';
import { bucketNameValidationSchema } from '../../../databrowser/buckets/BucketCreate';
import { VEEAM_BACKUP_REPLICATION_XML_VALUE } from '../../../ui-elements/Veeam/VeeamConstants';

const AccountTooltip = () => {
return (
<ul>
<ListItem>
Enter a unique ARTESCA account name, where your S3 & IAM Veeam resources
will be structured.
</ListItem>
<ListItem>
This information won’t be required by the Veeam console.
</ListItem>
</ul>
);
};

const ApplicationTooltip = () => {
return (
<ul>
<ListItem>Choose the Veeam application you're setting up.</ListItem>
<ListItem>
Features such as Immutable Backup and Max Repository Capacity (that
provides notification via Smart Object Storage API) are only supported
in Veeam Backup and Replication, and not in Veeam Backup for Microsoft
365.
</ListItem>
</ul>
);
};

const BucketNameTooltip = () => {
return (
<ul>
<ListItem>
This bucket is your future Veeam destination. You'll need it when
setting up your Veeam application. We'll also include this in the
summary provided by our Veeam assistant at the end.
</ListItem>
<ListItem>
The bucket name should follow few constraints:
<ul>
<li>Must be unique,</li>
<li>Cannot be modified after creation</li>
<li>
Bucket names can include only lowercase letters, numbers, dots (.),
and hyphens (-).
</li>
</ul>
</ListItem>
</ul>
);
};

const CapacityTooltip = () => {
return (
<ul>
<li>Set the maximum capacity for your Veeam backup repository</li>
<li>This will help monitor and manage your storage usage</li>
</ul>
);
};

const EnableImmutableBackupTooltip = () => {
return (
<ul>
<ListItem>
Veeam's Immutable Backup feature enhances data protection by using S3
Object-lock technology.
</ListItem>
<ListItem>
By selecting the Immutable Backup feature, the ARTESCA bucket is created
with Object-lock enabled.
</ListItem>
<ListItem>
Data backed up to your ARTESCA S3 bucket via Veeam will be immutable.
</ListItem>
</ul>
);
};

export const VeeamVBO: ISVPlatformConfig = {
id: 'veeam-vbo',
name: 'Veeam',
logo: <VeeamLogo />,
description: 'Prepare ARTESCA for ',
bucketTag: 'veeam-backup',
skipModalContent: (
<Text>
To start Veeam assistant configuration again, you can go to the{' '}
<b>Accounts</b> page. If the platform doesn't have any accounts, it will
also prompt you on your next login.
</Text>
),
fieldOverrides: [
{
name: 'accountName',
label: 'Account',
placeholder: 'Enter account name',
tooltip: <AccountTooltip />,
},
{
name: 'application',
label: 'Veeam application',
placeholder: 'Select Veeam application',
tooltip: <ApplicationTooltip />,
},
{
name: 'bucketName',
label: 'Bucket name',
placeholder: 'Enter bucket name',
tooltip: <BucketNameTooltip />,
},
{
name: 'capacity',
label: 'Repository Capacity',
placeholder: 'Enter capacity',
tooltip: <CapacityTooltip />,
},
{
name: 'enableImmutableBackup',
label: 'Immutable Backup',
tooltip: <EnableImmutableBackupTooltip />,
},
],
validator: Joi.object({
accountName: accountNameValidationSchema,
accountNameType: Joi.string().required(),
IAMUserName: accountNameValidationSchema,
IAMUserNameType: Joi.string().required(),
generateKey: Joi.boolean().required(),
application: Joi.string().required(),
enableImmutableBackup: Joi.boolean().required(),
buckets: Joi.array().items(
Joi.object({
name: bucketNameValidationSchema,
tag: Joi.string(),
capacity: Joi.when('application', {
is: Joi.equal(VEEAM_BACKUP_REPLICATION_XML_VALUE),
then: Joi.number()
.required()
.min(1)
.max(1024)
.custom((value, helpers) => checkDecimals(value, helpers)),
otherwise: Joi.valid(),
}),
capacityUnit: Joi.when('application', {
is: Joi.equal(VEEAM_BACKUP_REPLICATION_XML_VALUE),
then: Joi.string().required(),
otherwise: Joi.valid(),
}),
capacityBytes: Joi.number().required(),
}),
),
}),
};
2 changes: 1 addition & 1 deletion src/react/ISV/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Joi from '@hapi/joi';

export type ISVPlatform = 'veeam' | 'commvault';
export type ISVPlatform = 'veeam' | 'commvault' | 'veeam-vbo';

export type ISVConfig = {
accountName: string;
Expand Down
12 changes: 6 additions & 6 deletions src/react/ui-elements/PartnerApp/ISVList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import React from 'react';
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: 'veeam-vbo',
name: 'Veeam VBO',
logo: <VeeamLogo />,
type: 'Veeam Backup for Microsoft 365',
},

{ id: 'commvault', name: 'Commvault', logo: <CommvaultLogo /> },
];
Expand Down

0 comments on commit 4ecef8f

Please sign in to comment.