fix(xo-web/backup-ng/new): xoa plan verification (#2813)
This commit is contained in:
parent
ab1413b741
commit
73c746fdd3
@ -331,6 +331,8 @@ const messages = {
|
|||||||
backupName: 'Name',
|
backupName: 'Name',
|
||||||
useDelta: 'Use delta',
|
useDelta: 'Use delta',
|
||||||
useCompression: 'Use compression',
|
useCompression: 'Use compression',
|
||||||
|
dbAndDrRequireEntreprisePlan: 'Delta Backup and DR require Entreprise plan',
|
||||||
|
crRequiresPremiumPlan: 'CR requires Premium plan',
|
||||||
smartBackupModeTitle: 'Smart mode',
|
smartBackupModeTitle: 'Smart mode',
|
||||||
backupTargetRemotes: 'Target remotes (for Export)',
|
backupTargetRemotes: 'Target remotes (for Export)',
|
||||||
backupTargetSrs: 'Target SRs (for Replication)',
|
backupTargetSrs: 'Target SRs (for Replication)',
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import _ from 'intl'
|
import _ from 'intl'
|
||||||
import ActionButton from 'action-button'
|
import ActionButton from 'action-button'
|
||||||
|
import Icon from 'icon'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import renderXoItem, { renderXoItemFromId } from 'render-xo-item'
|
import renderXoItem, { renderXoItemFromId } from 'render-xo-item'
|
||||||
import Tooltip from 'tooltip'
|
import Tooltip from 'tooltip'
|
||||||
@ -559,14 +560,14 @@ export default [
|
|||||||
</Card>
|
</Card>
|
||||||
<Card>
|
<Card>
|
||||||
<CardBlock>
|
<CardBlock>
|
||||||
<div className='btn-toolbar text-xs-center'>
|
<div className='text-xs-center'>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
active={state.snapshotMode}
|
active={state.snapshotMode}
|
||||||
handler={effects.setSnapshotMode}
|
handler={effects.setSnapshotMode}
|
||||||
icon='rolling-snapshot'
|
icon='rolling-snapshot'
|
||||||
>
|
>
|
||||||
{_('rollingSnapshot')}
|
{_('rollingSnapshot')}
|
||||||
</ActionButton>
|
</ActionButton>{' '}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
active={state.backupMode}
|
active={state.backupMode}
|
||||||
disabled={state.isDelta}
|
disabled={state.isDelta}
|
||||||
@ -574,31 +575,50 @@ export default [
|
|||||||
icon='backup'
|
icon='backup'
|
||||||
>
|
>
|
||||||
{_('backup')}
|
{_('backup')}
|
||||||
</ActionButton>
|
</ActionButton>{' '}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
active={state.deltaMode}
|
active={state.deltaMode}
|
||||||
disabled={state.isFull}
|
disabled={
|
||||||
|
state.isFull ||
|
||||||
|
(!state.deltaMode && process.env.XOA_PLAN < 3)
|
||||||
|
}
|
||||||
handler={effects.setDeltaMode}
|
handler={effects.setDeltaMode}
|
||||||
icon='delta-backup'
|
icon='delta-backup'
|
||||||
>
|
>
|
||||||
{_('deltaBackup')}
|
{_('deltaBackup')}
|
||||||
</ActionButton>
|
</ActionButton>{' '}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
active={state.drMode}
|
active={state.drMode}
|
||||||
disabled={state.isDelta}
|
disabled={
|
||||||
|
state.isDelta ||
|
||||||
|
(!state.drMode && process.env.XOA_PLAN < 3)
|
||||||
|
}
|
||||||
handler={effects.setDrMode}
|
handler={effects.setDrMode}
|
||||||
icon='disaster-recovery'
|
icon='disaster-recovery'
|
||||||
>
|
>
|
||||||
{_('disasterRecovery')}
|
{_('disasterRecovery')}
|
||||||
</ActionButton>
|
</ActionButton>{' '}
|
||||||
|
{process.env.XOA_PLAN < 3 && (
|
||||||
|
<Tooltip content={_('dbAndDrRequireEntreprisePlan')}>
|
||||||
|
<Icon icon='info' />
|
||||||
|
</Tooltip>
|
||||||
|
)}{' '}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
active={state.crMode}
|
active={state.crMode}
|
||||||
disabled={state.isFull}
|
disabled={
|
||||||
|
state.isFull ||
|
||||||
|
(!state.crMode && process.env.XOA_PLAN < 4)
|
||||||
|
}
|
||||||
handler={effects.setCrMode}
|
handler={effects.setCrMode}
|
||||||
icon='continuous-replication'
|
icon='continuous-replication'
|
||||||
>
|
>
|
||||||
{_('continuousReplication')}
|
{_('continuousReplication')}
|
||||||
</ActionButton>
|
</ActionButton>{' '}
|
||||||
|
{process.env.XOA_PLAN < 4 && (
|
||||||
|
<Tooltip content={_('crRequiresPremiumPlan')}>
|
||||||
|
<Icon icon='info' />
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardBlock>
|
</CardBlock>
|
||||||
</Card>
|
</Card>
|
||||||
|
Loading…
Reference in New Issue
Block a user