mirror of https://github.com/apache/cloudstack.git
compute: Fixing rootdisk size override in deploy vm form (#542)
Addresses an issue from #520 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
c08e954717
commit
efc11e8131
|
|
@ -960,7 +960,8 @@ export default {
|
|||
})
|
||||
const templates = this.options.templates.filter(x => x.id === value)
|
||||
if (templates.length > 0) {
|
||||
this.dataPreFill.minrootdisksize = templates[0].size / (1024 * 1024 * 1024) || 0 // bytes to GB
|
||||
var size = templates[0].size / (1024 * 1024 * 1024) || 0 // bytes to GB
|
||||
this.dataPreFill.minrootdisksize = Math.ceil(size)
|
||||
}
|
||||
} else if (name === 'isoid') {
|
||||
this.tabKey = 'isoid'
|
||||
|
|
@ -1065,7 +1066,7 @@ export default {
|
|||
} else {
|
||||
deployVmData.templateid = values.isoid
|
||||
}
|
||||
if (values.rootdisksize && values.rootdisksize > 0) {
|
||||
if (this.showRootDiskSizeChanger && values.rootdisksize && values.rootdisksize > 0) {
|
||||
deployVmData.rootdisksize = values.rootdisksize
|
||||
}
|
||||
if (values.hypervisor && values.hypervisor.length > 0) {
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
minDiskSize (newItem) {
|
||||
if (this.inputValue < newItem) {
|
||||
if (newItem && newItem > 0) {
|
||||
this.inputValue = newItem
|
||||
this.updateDiskSize(newItem)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue