Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
b-Nollet committed Sep 10, 2024
1 parent 7c31b44 commit 160b3b6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions packages/xo-web/src/xo-app/backup/new/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,19 +338,25 @@ const New = decorate([
})
)

const normalizedSettings = normalizeSettings({
offlineBackupActive: state.offlineBackupActive,
settings: settings || state.propSettings,
exportMode: state.exportMode,
copyMode: state.copyMode,
snapshotMode: state.snapshotMode,
}).toObject()

if (normalizedSettings[''].maxExportRate <= 0) {
normalizedSettings[''].maxExportRate = undefined
}

await editBackupNgJob({
id: props.job.id,
name: state.name,
mode: state.isDelta ? 'delta' : 'full',
compression: state.compression,
proxy: state.proxyId,
settings: normalizeSettings({
offlineBackupActive: state.offlineBackupActive,
settings: settings || state.propSettings,
exportMode: state.exportMode,
copyMode: state.copyMode,
snapshotMode: state.snapshotMode,
}).toObject(),
settings: normalizedSettings,
remotes: state.deltaMode || state.backupMode ? constructPattern(state.remotes) : constructPattern([]),
srs: state.crMode || state.drMode ? constructPattern(state.srs) : constructPattern([]),
vms: state.smartMode ? state.vmsSmartPattern : constructPattern(state.vms),
Expand Down

0 comments on commit 160b3b6

Please sign in to comment.