fix(xo-web/proxies): fix "invalid parameters" error on canceling proxy deploy (#5649)
Issue: fetchProxyUpgrades called with an undefined proxy in the proxies collection. Solution: Interrupt the deployment process on cancel, in order to not fetch updates in this case.
This commit is contained in:
parent
b7603e109d
commit
9601ad13ee
@ -1,7 +1,6 @@
|
||||
import _, { messages } from 'intl'
|
||||
import decorate from 'apply-decorators'
|
||||
import Icon from 'icon'
|
||||
import noop from 'lodash/noop'
|
||||
import React from 'react'
|
||||
import SingleLineRow from 'single-line-row'
|
||||
import Tooltip from 'tooltip'
|
||||
@ -249,8 +248,8 @@ const deployProxy = async ({ proxy } = {}) => {
|
||||
|
||||
const title = isRedeployMode ? _('redeployProxy') : _('deployProxy')
|
||||
if (license === undefined) {
|
||||
const value = 'trial'
|
||||
const choice = await chooseAction({
|
||||
// it rejects with undefined when the start trial option isn't chosen
|
||||
await chooseAction({
|
||||
body: (
|
||||
<div className='text-muted'>
|
||||
<Icon icon='info' /> {_('noLicenseAvailable')}
|
||||
@ -261,15 +260,11 @@ const deployProxy = async ({ proxy } = {}) => {
|
||||
btnStyle: 'success',
|
||||
icon: 'trial',
|
||||
label: _('trialStartButton'),
|
||||
value,
|
||||
},
|
||||
],
|
||||
icon: 'proxy',
|
||||
title,
|
||||
}).catch(noop)
|
||||
if (choice !== value) {
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
try {
|
||||
license = await createProxyTrialLicense()
|
||||
|
Loading…
Reference in New Issue
Block a user