mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-9697: Added better error message user if tries to shrink (#2145)
the VM ROOT volume size Skip the API call altogether if the UI detects this and throw a more user friendly message
This commit is contained in:
parent
b936feb108
commit
e43a4b9a09
@ -2276,6 +2276,7 @@ var dictionary = {"ICMP.code":"ICMP Code",
|
||||
"message.vnmc.available.list":"VNMC is not available from provider list.",
|
||||
"message.vnmc.not.available.list":"VNMC is not available from provider list.",
|
||||
"message.volume.create.template.confirm":"Please confirm that you wish to create a template for this disk volume. Creation of the template can range from several minutes to longer depending on the size of the volume.",
|
||||
"message.volume.root.shrink.disk.size" :"Shrink operation on ROOT volume not supported",
|
||||
"message.waiting.for.builtin.templates.to.load":"Waiting for builtin templates to load...",
|
||||
"message.you.must.have.at.least.one.physical.network":"You must have at least one physical network",
|
||||
"message.your.cloudstack.is.ready":"Your CloudStack is ready!",
|
||||
|
||||
@ -1706,6 +1706,11 @@
|
||||
array1.push("&maxiops=" + todb(maxIops));
|
||||
}
|
||||
}
|
||||
//if original disk size > new disk size
|
||||
if ((args.context.volumes[0].type == "ROOT")
|
||||
&& (args.context.volumes[0].size > (newSize * (1024 * 1024 * 1024)))) {
|
||||
return args.response.error('message.volume.root.shrink.disk.size');
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user