chore(xo-web/copyVm): remove unused code (#3888)

This commit is contained in:
badrAZ 2019-01-21 16:25:05 +01:00 committed by Pierre Donias
parent bbf5e82c5d
commit eb4f9f0b18
2 changed files with 14 additions and 21 deletions

View File

@ -1625,7 +1625,6 @@ const messages = {
// ----- Copy VM ----- // ----- Copy VM -----
copyVm: 'Copy VM', copyVm: 'Copy VM',
copyVmConfirm: 'Are you sure you want to copy this VM to {SR}?',
copyVmName: 'Name', copyVmName: 'Name',
copyVmNamePattern: 'Name pattern', copyVmNamePattern: 'Name pattern',
copyVmNamePlaceholder: 'If empty: name of the copied VM', copyVmNamePlaceholder: 'If empty: name of the copied VM',

View File

@ -1003,13 +1003,8 @@ const _copyVm = ({ vm, sr, name, compress }) =>
}) })
import CopyVmModalBody from './copy-vm-modal' // eslint-disable-line import/first import CopyVmModalBody from './copy-vm-modal' // eslint-disable-line import/first
export const copyVm = (vm, sr, name, compress) => { export const copyVm = vm =>
return sr !== undefined confirm({
? confirm({
title: _('copyVm'),
body: _('copyVmConfirm', { SR: sr.name_label }),
}).then(() => _copyVm({ vm, sr: sr.id, name, compress }))
: confirm({
title: _('copyVm'), title: _('copyVm'),
body: <CopyVmModalBody vm={vm} />, body: <CopyVmModalBody vm={vm} />,
}).then(params => { }).then(params => {
@ -1022,7 +1017,6 @@ export const copyVm = (vm, sr, name, compress) => {
} }
return cloneVm({ id: vm.id, name_label: params.name }) return cloneVm({ id: vm.id, name_label: params.name })
}, noop) }, noop)
}
import CopyVmsModalBody from './copy-vms-modal' // eslint-disable-line import/first import CopyVmsModalBody from './copy-vms-modal' // eslint-disable-line import/first
export const copyVms = vms => { export const copyVms = vms => {