mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4428: UI > volume > when hypervisor is KVM and kvm.snapshot.enabled configuration is false, still show Take Snapshot option if VM State is Stopped.
(cherry picked from commit 57070b1dc2)
Signed-off-by: animesh <animesh@apache.org>
This commit is contained in:
parent
5d90c60d63
commit
261c86a390
|
|
@ -1864,13 +1864,21 @@
|
|||
return ["remove"];
|
||||
}
|
||||
|
||||
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
|
||||
if(jsonObj.hypervisor != 'KVM'
|
||||
|| (jsonObj.hypervisor == 'KVM' && g_KVMsnapshotenabled == true) ) {
|
||||
allowedActions.push("takeSnapshot");
|
||||
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
|
||||
if (jsonObj.hypervisor == 'KVM') {
|
||||
if (g_KVMsnapshotenabled == true) {
|
||||
allowedActions.push("takeSnapshot");
|
||||
allowedActions.push("recurringSnapshot");
|
||||
} else {
|
||||
if(jsonObj.vmstate == 'Stopped') {
|
||||
allowedActions.push("takeSnapshot");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
allowedActions.push("takeSnapshot");
|
||||
allowedActions.push("recurringSnapshot");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (jsonObj.type == "DATADISK") {
|
||||
allowedActions.push("resize");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue