From 31dc829e850ae2b90b570c0f5ac4e531a4338a6b Mon Sep 17 00:00:00 2001 From: Jean-Marc Millet Date: Mon, 9 Sep 2024 16:53:21 +0200 Subject: [PATCH] add Microsoft office V8 option for veeam configuration --- src/react/databrowser/buckets/details/Overview.tsx | 3 ++- src/react/ui-elements/Veeam/VeeamConfiguration.tsx | 13 +++++++++++-- src/react/ui-elements/Veeam/VeeamConstants.ts | 6 ++++-- src/react/ui-elements/Veeam/useMutationTableData.ts | 9 ++++++--- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/react/databrowser/buckets/details/Overview.tsx b/src/react/databrowser/buckets/details/Overview.tsx index b4d9686e7..9f6f0dbf0 100644 --- a/src/react/databrowser/buckets/details/Overview.tsx +++ b/src/react/databrowser/buckets/details/Overview.tsx @@ -239,7 +239,8 @@ function Overview({ bucket, ingestionStates }: Props) { tags.status === 'success' && tags.value?.[BUCKET_TAG_VEEAM_APPLICATION]; const isVeeamBucket = (veeamTagApplication === VeeamApplicationType.VEEAM_BACKUP_REPLICATION || - veeamTagApplication === VeeamApplicationType.VEEAM_OFFICE_365) && + veeamTagApplication === VeeamApplicationType.VEEAM_OFFICE_365 || + veeamTagApplication === VeeamApplicationType.VEEAM_OFFICE_365_V8) && VEEAM_FEATURE_FLAG_ENABLED; useEffect(() => { dispatch(getBucketInfo(bucket.name)); diff --git a/src/react/ui-elements/Veeam/VeeamConfiguration.tsx b/src/react/ui-elements/Veeam/VeeamConfiguration.tsx index e3ce86002..c0a71cbe5 100644 --- a/src/react/ui-elements/Veeam/VeeamConfiguration.tsx +++ b/src/react/ui-elements/Veeam/VeeamConfiguration.tsx @@ -27,6 +27,7 @@ import { VEEAM_BACKUP_REPLICATION_XML_VALUE, VEEAM_DEFAULT_ACCOUNT_NAME, VEEAM_OFFICE_365, + VEEAM_OFFICE_365_V8, unitChoices, } from './VeeamConstants'; import { VeeamSkipModal } from './VeeamSkipModal'; @@ -187,7 +188,8 @@ const Configuration = () => { application, capacityBytes: getCapacityBytes(capacity, capacityUnit), enableImmutableBackup: - application === VEEAM_BACKUP_REPLICATION_XML_VALUE + application === VEEAM_BACKUP_REPLICATION_XML_VALUE || + application === VEEAM_OFFICE_365_V8 ? enableImmutableBackup : false, accountName, @@ -298,6 +300,12 @@ const Configuration = () => { > {VEEAM_OFFICE_365} + + {VEEAM_OFFICE_365_V8} + ); }} @@ -321,7 +329,8 @@ const Configuration = () => { /> } /> - {application === VEEAM_BACKUP_REPLICATION_XML_VALUE ? ( + {application === VEEAM_BACKUP_REPLICATION_XML_VALUE || + application === VEEAM_OFFICE_365_V8 ? ( JSON.stringify({ @@ -46,7 +47,8 @@ export const GET_CAPACITY_XML_CONTENT = (capacity: string) => export const VEEAM_DEFAULT_ACCOUNT_NAME = 'Veeam'; export enum VeeamApplicationType { VEEAM_BACKUP_REPLICATION = 'Veeam Backup & Replication', - VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365', + VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (pre-v8)', + VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8)', } export const unitChoices = { GiB: 1024 ** 3, diff --git a/src/react/ui-elements/Veeam/useMutationTableData.ts b/src/react/ui-elements/Veeam/useMutationTableData.ts index 4276b1a4a..77666646a 100644 --- a/src/react/ui-elements/Veeam/useMutationTableData.ts +++ b/src/react/ui-elements/Veeam/useMutationTableData.ts @@ -25,6 +25,7 @@ import { GET_VEEAM_NON_IMMUTABLE_POLICY, SYSTEM_XML_CONTENT, VEEAM_BACKUP_REPLICATION_XML_VALUE, + VEEAM_OFFICE_365_V8, VEEAM_XML_PREFIX, } from './VeeamConstants'; import { useCreateBucket } from '../../next-architecture/domain/business/buckets'; @@ -109,6 +110,7 @@ export const useMutationTableData = ({ const isVeeamVBR = propsConfiguration.application === VEEAM_BACKUP_REPLICATION_XML_VALUE; + const isVeeamVBOV8 = propsConfiguration.application === VEEAM_OFFICE_365_V8; const mutations = isVeeamVBR ? mutationsVBR : mutationsVBO; const instanceId = useInstanceId(); @@ -140,9 +142,10 @@ export const useMutationTableData = ({ createBucketMutation: () => { return { Bucket: propsConfiguration.bucketName, - ObjectLockEnabledForBucket: isVeeamVBR - ? propsConfiguration.enableImmutableBackup - : false, + ObjectLockEnabledForBucket: + isVeeamVBR || isVeeamVBOV8 + ? propsConfiguration.enableImmutableBackup + : false, }; }, createIAMUserMutation: () => {