Skip to content

Commit 4916f3c

Browse files
author
Hoang Nguyen
authored
UI - Fix Locked "Override Root Disk Size" switch (apache#5843)
* Fix Locked "Override Root Disk Size" switch * fixes ut
1 parent 0f926b5 commit 4916f3c

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

ui/src/views/compute/DeployVM.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ export default {
11331133
this.vm.hostname = host.name
11341134
}
11351135
1136-
if (this.serviceOffering.rootdisksize) {
1136+
if (this.serviceOffering?.rootdisksize) {
11371137
this.vm.disksizetotalgb = this.serviceOffering.rootdisksize
11381138
} else if (this.diskSize) {
11391139
this.vm.disksizetotalgb = this.diskSize
@@ -2097,6 +2097,7 @@ export default {
20972097
this.updateComputeOffering(null)
20982098
},
20992099
updateTemplateConfigurationOfferingDetails (offeringId) {
2100+
this.rootDiskSizeFixed = 0
21002101
var offering = this.serviceOffering
21012102
if (!offering || offering.id !== offeringId) {
21022103
offering = _.find(this.options.serviceOfferings, (option) => option.id === offeringId)

ui/tests/unit/views/AutogenView.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ mocks = {
5757
return option
5858
}),
5959
info: jest.fn((option) => {
60-
return option
60+
return {
61+
message: option.message,
62+
description: 'test-description',
63+
duration: option.duration
64+
}
6165
}),
6266
success: jest.fn((option) => {
6367
return option

0 commit comments

Comments
 (0)