parent
36f7af8576
commit
93985e1a51
@ -15,6 +15,7 @@
|
|||||||
- [Hosts] Ability to enable/disable host multipathing [#3659](https://github.com/vatesfr/xen-orchestra/issues/3659) (PR [#3865](https://github.com/vatesfr/xen-orchestra/pull/3865))
|
- [Hosts] Ability to enable/disable host multipathing [#3659](https://github.com/vatesfr/xen-orchestra/issues/3659) (PR [#3865](https://github.com/vatesfr/xen-orchestra/pull/3865))
|
||||||
- [Login] Add OTP authentication [#2044](https://github.com/vatesfr/xen-orchestra/issues/2044) (PR [#3879](https://github.com/vatesfr/xen-orchestra/pull/3879))
|
- [Login] Add OTP authentication [#2044](https://github.com/vatesfr/xen-orchestra/issues/2044) (PR [#3879](https://github.com/vatesfr/xen-orchestra/pull/3879))
|
||||||
- [Notifications] New notification page to provide important information about XOA (PR [#3904](https://github.com/vatesfr/xen-orchestra/pull/3904))
|
- [Notifications] New notification page to provide important information about XOA (PR [#3904](https://github.com/vatesfr/xen-orchestra/pull/3904))
|
||||||
|
- [VM] Ability to export a VM with zstd compression [#3773](https://github.com/vatesfr/xen-orchestra/issues/3773) (PR [#3891](https://github.com/vatesfr/xen-orchestra/pull/3891))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
35
packages/xo-web/src/common/xo/export-vm-modal/index.js
Normal file
35
packages/xo-web/src/common/xo/export-vm-modal/index.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import BaseComponent from 'base-component'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import _ from '../../intl'
|
||||||
|
import SelectCompression from '../../select-compression'
|
||||||
|
import { Container, Row, Col } from '../../grid'
|
||||||
|
|
||||||
|
export default class ExportVmModalBody extends BaseComponent {
|
||||||
|
state = {
|
||||||
|
compression: '',
|
||||||
|
}
|
||||||
|
|
||||||
|
get value() {
|
||||||
|
const compression = this.state.compression
|
||||||
|
return compression === 'zstd' ? 'zstd' : compression === 'native'
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<Container>
|
||||||
|
<Row>
|
||||||
|
<Col mediumSize={6}>
|
||||||
|
<strong>{_('compression')}</strong>
|
||||||
|
</Col>
|
||||||
|
<Col mediumSize={6}>
|
||||||
|
<SelectCompression
|
||||||
|
onChange={this.linkState('compression')}
|
||||||
|
value={this.state.compression}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Container>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -1425,12 +1425,21 @@ export const importVms = (vms, sr) =>
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
export const exportVm = vm => {
|
import ExportVmModalBody from './export-vm-modal' // eslint-disable-line import/first
|
||||||
info(_('startVmExport'), vm.id)
|
export const exportVm = vm =>
|
||||||
return _call('vm.export', { vm: resolveId(vm) }).then(({ $getFrom: url }) => {
|
confirm({
|
||||||
window.location = `.${url}`
|
body: <ExportVmModalBody />,
|
||||||
|
icon: 'export',
|
||||||
|
title: _('exportVmLabel'),
|
||||||
|
}).then(compress => {
|
||||||
|
const id = resolveId(vm)
|
||||||
|
info(_('startVmExport'), id)
|
||||||
|
return _call('vm.export', { vm: id, compress }).then(
|
||||||
|
({ $getFrom: url }) => {
|
||||||
|
window.location = `.${url}`
|
||||||
|
}
|
||||||
|
)
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
export const exportVdi = vdi => {
|
export const exportVdi = vdi => {
|
||||||
info(_('startVdiExport'), vdi.id)
|
info(_('startVdiExport'), vdi.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user