mirror of https://github.com/apache/cloudstack.git
Merge release branch 4.17 to main
* 4.17: server: add/update user vm details for new root disk size (issue 7139) (#7145) UI: fix missing networkid and zoneid when add instance from vpc network (#7151)
This commit is contained in:
commit
154f3ac1a7
|
|
@ -1487,11 +1487,14 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
|||
}
|
||||
|
||||
_volsDao.update(volume.getId(), volume);
|
||||
if (userVm != null) {
|
||||
if (Volume.Type.ROOT.equals(volume.getVolumeType()) && userVm != null) {
|
||||
UserVmDetailVO userVmDetailVO = userVmDetailsDao.findDetail(userVm.getId(), VmDetailConstants.ROOT_DISK_SIZE);
|
||||
if (userVmDetailVO != null) {
|
||||
userVmDetailVO.setValue(String.valueOf(newSize/ GiB_TO_BYTES));
|
||||
userVmDetailsDao.update(userVmDetailVO.getId(), userVmDetailVO);
|
||||
} else {
|
||||
UserVmDetailVO detailVO = new UserVmDetailVO(userVm.getId(), VmDetailConstants.ROOT_DISK_SIZE, String.valueOf(newSize/ GiB_TO_BYTES), true);
|
||||
userVmDetailsDao.persist(detailVO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
type="dashed"
|
||||
style="margin-bottom: 15px; width: 100%"
|
||||
:disabled="!('deployVirtualMachine' in $store.getters.apis)"
|
||||
@click="$router.push({ path: '/action/deployVirtualMachine?networkid=' + network.id + '&zoneid=' + network.zoneid })">
|
||||
@click="$router.push({ path: '/action/deployVirtualMachine', query: { networkid: network.id, zoneid: network.zoneid } })">
|
||||
<template #icon><plus-outlined /></template>
|
||||
{{ $t('label.vm.add') }}
|
||||
</a-button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue