fix(xo-web): use window.open instead of window.location (#4782)
Fixes #4709 Changing the location closes the WebSocket connection.
This commit is contained in:
parent
cedc20ce6a
commit
cb41a79b36
@ -523,7 +523,7 @@ export const importConfig = config =>
|
|||||||
|
|
||||||
export const exportConfig = () =>
|
export const exportConfig = () =>
|
||||||
_call('xo.exportConfig').then(({ $getFrom: url }) => {
|
_call('xo.exportConfig').then(({ $getFrom: url }) => {
|
||||||
window.location = `.${url}`
|
window.open(`.${url}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Server ------------------------------------------------------------
|
// Server ------------------------------------------------------------
|
||||||
@ -1568,7 +1568,7 @@ export const exportVm = vm =>
|
|||||||
info(_('startVmExport'), id)
|
info(_('startVmExport'), id)
|
||||||
return _call('vm.export', { vm: id, compress }).then(
|
return _call('vm.export', { vm: id, compress }).then(
|
||||||
({ $getFrom: url }) => {
|
({ $getFrom: url }) => {
|
||||||
window.location = `.${url}`
|
window.open(`.${url}`)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
@ -1577,7 +1577,7 @@ export const exportVdi = vdi => {
|
|||||||
info(_('startVdiExport'), vdi.id)
|
info(_('startVdiExport'), vdi.id)
|
||||||
return _call('disk.exportContent', { id: resolveId(vdi) }).then(
|
return _call('disk.exportContent', { id: resolveId(vdi) }).then(
|
||||||
({ $getFrom: url }) => {
|
({ $getFrom: url }) => {
|
||||||
window.location = `.${url}`
|
window.open(`.${url}`)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -2361,7 +2361,7 @@ export const fetchFiles = (remote, disk, partition, paths, format) =>
|
|||||||
'backup.fetchFiles',
|
'backup.fetchFiles',
|
||||||
resolveIds({ remote, disk, partition, paths, format })
|
resolveIds({ remote, disk, partition, paths, format })
|
||||||
).then(({ $getFrom: url }) => {
|
).then(({ $getFrom: url }) => {
|
||||||
window.location = `.${url}`
|
window.open(`.${url}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// File restore NG ----------------------------------------------------
|
// File restore NG ----------------------------------------------------
|
||||||
@ -2377,7 +2377,7 @@ export const fetchFilesNg = (remote, disk, partition, paths) =>
|
|||||||
'backupNg.fetchFiles',
|
'backupNg.fetchFiles',
|
||||||
resolveIds({ remote, disk, partition, paths })
|
resolveIds({ remote, disk, partition, paths })
|
||||||
).then(({ $getFrom: url }) => {
|
).then(({ $getFrom: url }) => {
|
||||||
window.location = `.${url}`
|
window.open(`.${url}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user