diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index bc59d58ce51..979343a8731 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -1133,7 +1133,7 @@ export default { this.vm.hostname = host.name } - if (this.serviceOffering.rootdisksize) { + if (this.serviceOffering?.rootdisksize) { this.vm.disksizetotalgb = this.serviceOffering.rootdisksize } else if (this.diskSize) { this.vm.disksizetotalgb = this.diskSize @@ -2097,6 +2097,7 @@ export default { this.updateComputeOffering(null) }, updateTemplateConfigurationOfferingDetails (offeringId) { + this.rootDiskSizeFixed = 0 var offering = this.serviceOffering if (!offering || offering.id !== offeringId) { offering = _.find(this.options.serviceOfferings, (option) => option.id === offeringId) diff --git a/ui/tests/unit/views/AutogenView.spec.js b/ui/tests/unit/views/AutogenView.spec.js index 9a20a0a3306..99df7d9fa42 100644 --- a/ui/tests/unit/views/AutogenView.spec.js +++ b/ui/tests/unit/views/AutogenView.spec.js @@ -57,7 +57,11 @@ mocks = { return option }), info: jest.fn((option) => { - return option + return { + message: option.message, + description: 'test-description', + duration: option.duration + } }), success: jest.fn((option) => { return option