mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: Fixed root volume resize from ui (#3873)
This PR fixes the volume resize action for a root volume from the UI. Fixes: #3860 #3874
This commit is contained in:
parent
78cc0a44c1
commit
5ae65bfab0
@ -1575,13 +1575,13 @@
|
||||
if (newDiskOffering != null && newDiskOffering.length > 0) {
|
||||
array1.push("&diskofferingid=" + encodeURIComponent(newDiskOffering));
|
||||
}
|
||||
if (selectedDiskOfferingObj.iscustomized == true) {
|
||||
if (args.context.volumes[0].type == "ROOT" || selectedDiskOfferingObj.iscustomized == true) {
|
||||
cloudStack.addNewSizeToCommandUrlParameterArrayIfItIsNotNullAndHigherThanZero(array1, args.data.newsize);
|
||||
}
|
||||
|
||||
var minIops;
|
||||
var maxIops
|
||||
if (selectedDiskOfferingObj.iscustomizediops == true) {
|
||||
if (selectedDiskOfferingObj != null && selectedDiskOfferingObj.iscustomizediops == true) {
|
||||
minIops = args.data.minIops;
|
||||
maxIops = args.data.maxIops;
|
||||
}
|
||||
@ -1594,12 +1594,11 @@
|
||||
array1.push("&maxiops=" + encodeURIComponent(maxIops));
|
||||
}
|
||||
//if original disk size > new disk size
|
||||
if ((args.context.volumes[0].type == "ROOT")
|
||||
&& (args.context.volumes[0].size > (newSize * (1024 * 1024 * 1024)))) {
|
||||
if (args.context.volumes[0].type == "ROOT" &&
|
||||
args.context.volumes[0].size > (args.data.newsize * (1024 * 1024 * 1024))) {
|
||||
return args.response.error('message.volume.root.shrink.disk.size');
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: createURL("resizeVolume&id=" + args.context.volumes[0].id + array1.join("")),
|
||||
dataType: "json",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user