feat(xo-web/backup-ng): ability to set the full backup interval (#4099)
Fixes #1783
This commit is contained in:
parent
2886ec116f
commit
bc14a1d167
@ -10,6 +10,7 @@
|
||||
- [VM/Snapshots] Always delete broken quiesced snapshots [#4074](https://github.com/vatesfr/xen-orchestra/issues/4074) (PR [#4075](https://github.com/vatesfr/xen-orchestra/pull/4075))
|
||||
- [Settings/Servers] Display link to pool [#4041](https://github.com/vatesfr/xen-orchestra/issues/4041) (PR [#4045](https://github.com/vatesfr/xen-orchestra/pull/4045))
|
||||
- [Import] Change wording of drop zone (PR [#4020](https://github.com/vatesfr/xen-orchestra/pull/4020))
|
||||
- [Backup NG] Ability to set the interval of the full backups [#1783](https://github.com/vatesfr/xen-orchestra/issues/1783) (PR [#4083](https://github.com/vatesfr/xen-orchestra/pull/4083))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -443,6 +443,7 @@ const messages = {
|
||||
offlineSnapshotInfo: 'Shutdown VMs before snapshotting them',
|
||||
timeout: 'Timeout',
|
||||
timeoutInfo: 'Number of hours after which a job is considered failed',
|
||||
fullBackupInterval: 'Full backup interval',
|
||||
timeoutUnit: 'in hours',
|
||||
dbAndDrRequireEnterprisePlan: 'Delta Backup and DR require Enterprise plan',
|
||||
crRequiresPremiumPlan: 'CR requires Premium plan',
|
||||
|
@ -5,6 +5,7 @@ const DEFAULTS = {
|
||||
|
||||
compression: '',
|
||||
concurrency: 0,
|
||||
fullInterval: 0,
|
||||
offlineSnapshot: false,
|
||||
timeout: 0,
|
||||
}
|
||||
|
@ -249,6 +249,7 @@ class JobsTable extends React.Component {
|
||||
const {
|
||||
compression,
|
||||
concurrency,
|
||||
fullInterval,
|
||||
offlineSnapshot,
|
||||
reportWhen,
|
||||
timeout,
|
||||
@ -268,6 +269,9 @@ class JobsTable extends React.Component {
|
||||
{timeout !== undefined && (
|
||||
<Li>{_.keyValue(_('timeout'), timeout / 3600e3)} hours</Li>
|
||||
)}
|
||||
{fullInterval !== undefined && (
|
||||
<Li>{_.keyValue(_('fullBackupInterval'), fullInterval)}</Li>
|
||||
)}
|
||||
{offlineSnapshot !== undefined && (
|
||||
<Li>
|
||||
{_.keyValue(
|
||||
|
@ -520,6 +520,12 @@ export default decorate([
|
||||
value: value && value * 3600e3,
|
||||
})
|
||||
},
|
||||
setFullInterval({ setGlobalSettings }, value) {
|
||||
setGlobalSettings({
|
||||
name: 'fullInterval',
|
||||
value,
|
||||
})
|
||||
},
|
||||
setOfflineSnapshot: (
|
||||
{ setGlobalSettings },
|
||||
{ target: { checked: value } }
|
||||
@ -534,6 +540,7 @@ export default decorate([
|
||||
compressionId: generateId,
|
||||
formId: generateId,
|
||||
inputConcurrencyId: generateId,
|
||||
inputFullIntervalId: generateId,
|
||||
inputReportWhenId: generateId,
|
||||
inputTimeoutId: generateId,
|
||||
|
||||
@ -631,9 +638,14 @@ export default decorate([
|
||||
({ state, effects, remotes, srsById, job = {}, intl }) => {
|
||||
const { formatMessage } = intl
|
||||
const { propSettings, settings = propSettings } = state
|
||||
const { concurrency, reportWhen = 'failure', offlineSnapshot, timeout } =
|
||||
settings.get('') || {}
|
||||
const compression = defined(state.compression, job.compression, '')
|
||||
const {
|
||||
concurrency,
|
||||
fullInterval,
|
||||
offlineSnapshot,
|
||||
reportWhen = 'failure',
|
||||
timeout,
|
||||
} = settings.get('') || {}
|
||||
|
||||
if (state.needUpdateParams) {
|
||||
effects.updateParams()
|
||||
@ -923,6 +935,16 @@ export default decorate([
|
||||
placeholder={formatMessage(messages.timeoutUnit)}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<label htmlFor={state.inputFullIntervalId}>
|
||||
<strong>{_('fullBackupInterval')}</strong>
|
||||
</label>{' '}
|
||||
<Number
|
||||
id={state.inputFullIntervalId}
|
||||
onChange={effects.setFullInterval}
|
||||
value={fullInterval}
|
||||
/>
|
||||
</FormGroup>
|
||||
{state.isFull && (
|
||||
<FormGroup>
|
||||
<label htmlFor={state.compressionId}>
|
||||
|
Loading…
Reference in New Issue
Block a user