From 607ac8b3d27e3d32ae3984c851be9569964ac21d Mon Sep 17 00:00:00 2001 From: utchoang Date: Mon, 10 Jan 2022 13:31:18 +0700 Subject: [PATCH 1/2] Fix Locked "Override Root Disk Size" switch --- ui/src/views/compute/DeployVM.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index bc59d58ce512..979343a87317 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) From 911dcb8f37bc8a454b01ed5cdada3b0eb26a7e58 Mon Sep 17 00:00:00 2001 From: utchoang Date: Mon, 10 Jan 2022 14:06:26 +0700 Subject: [PATCH 2/2] fixes ut --- ui/tests/unit/views/AutogenView.spec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/tests/unit/views/AutogenView.spec.js b/ui/tests/unit/views/AutogenView.spec.js index 9a20a0a3306f..99df7d9fa427 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