mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-7261: related UI change after lsitSystemVMs/listRouters API were fixed to return hypervisor property while state is running.
This commit is contained in:
parent
9b65759f36
commit
07c9c02789
@ -20510,15 +20510,11 @@
|
||||
|
||||
if (jsonObj.state == 'Running') {
|
||||
allowedActions.push("stop");
|
||||
|
||||
//when systemVm is running, scaleUp is not supported for KVM and XenServer.
|
||||
//however, listRouters API doesn't return hypervisor property....
|
||||
/*
|
||||
if (jsonObj.hypervisor != 'KVM' && jsonObj.hypervisor != 'XenServer') {
|
||||
allowedActions.push("scaleUp");
|
||||
}
|
||||
*/
|
||||
allowedActions.push("scaleUp");
|
||||
|
||||
//when router is Running, only XenServer, VMware support scaleUp(change service offering)
|
||||
if (jsonObj.hypervisor == 'XenServer' || jsonObj.hypervisor == "VMware") {
|
||||
allowedActions.push("scaleUp");
|
||||
}
|
||||
|
||||
allowedActions.push("restart");
|
||||
|
||||
@ -20527,8 +20523,10 @@
|
||||
allowedActions.push("migrate");
|
||||
} else if (jsonObj.state == 'Stopped') {
|
||||
allowedActions.push("start");
|
||||
|
||||
//when router is Stopped, all hypervisors support scaleUp(change service offering)
|
||||
allowedActions.push("scaleUp");
|
||||
//when vm is stopped, scaleUp is supported for all hypervisors
|
||||
|
||||
allowedActions.push("remove");
|
||||
}
|
||||
return allowedActions;
|
||||
@ -20559,22 +20557,20 @@
|
||||
allowedActions.push("restart");
|
||||
allowedActions.push("remove");
|
||||
|
||||
//when systemVm is running, scaleUp is not supported for KVM and XenServer.
|
||||
//however, listSystemVms API doesn't return hypervisor property....
|
||||
/*
|
||||
if (jsonObj.hypervisor != 'KVM' && jsonObj.hypervisor != 'XenServer') {
|
||||
allowedActions.push("scaleUp");
|
||||
//when systemvm is Running, only XenServer, VMware support scaleUp(change service offering)
|
||||
if (jsonObj.hypervisor == 'XenServer' ||jsonObj.hypervisor == "VMware") {
|
||||
allowedActions.push("scaleUp");
|
||||
}
|
||||
*/
|
||||
allowedActions.push("scaleUp");
|
||||
|
||||
allowedActions.push("viewConsole");
|
||||
if (isAdmin())
|
||||
allowedActions.push("migrate");
|
||||
} else if (jsonObj.state == 'Stopped') {
|
||||
allowedActions.push("start");
|
||||
|
||||
//when systemvm is Stopped, all hypervisors support scaleUp(change service offering)
|
||||
allowedActions.push("scaleUp");
|
||||
//when vm is stopped, scaleUp is supported for all hypervisors
|
||||
|
||||
allowedActions.push("remove");
|
||||
} else if (jsonObj.state == 'Error') {
|
||||
allowedActions.push("remove");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user