mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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.
This commit is contained in:
parent
96a17cc036
commit
dac66d74df
@ -1864,13 +1864,21 @@
|
|||||||
return ["remove"];
|
return ["remove"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
|
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
|
||||||
if(jsonObj.hypervisor != 'KVM'
|
if (jsonObj.hypervisor == 'KVM') {
|
||||||
|| (jsonObj.hypervisor == 'KVM' && g_KVMsnapshotenabled == true) ) {
|
if (g_KVMsnapshotenabled == true) {
|
||||||
allowedActions.push("takeSnapshot");
|
allowedActions.push("takeSnapshot");
|
||||||
|
allowedActions.push("recurringSnapshot");
|
||||||
|
} else {
|
||||||
|
if(jsonObj.vmstate == 'Stopped') {
|
||||||
|
allowedActions.push("takeSnapshot");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
allowedActions.push("takeSnapshot");
|
||||||
allowedActions.push("recurringSnapshot");
|
allowedActions.push("recurringSnapshot");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonObj.type == "DATADISK") {
|
if (jsonObj.type == "DATADISK") {
|
||||||
allowedActions.push("resize");
|
allowedActions.push("resize");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user