CLOUDSTACK-4102: UI > Instracture > SystemVM / VirtualRouter > detailView > change service offering action - display different description based on VM's state.

This commit is contained in:
Jessica Wang 2013-08-22 14:09:45 -07:00
parent ecccb88aa9
commit 2e56e7b02c
1 changed files with 27 additions and 3 deletions

View File

@ -6639,7 +6639,15 @@
label: 'label.change.service.offering',
createForm: {
title: 'label.change.service.offering',
desc: 'Please read the dynamic scaling section in the admin guide before scaling up.',
desc: function(args) {
var description = '';
var vmObj = args.jsonObj;
//if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { //needs to wait for API fix that will return hypervisor property
if (vmObj.state == 'Running') {
description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
}
return description;
},
fields: {
serviceOfferingId: {
label: 'label.compute.offering',
@ -7606,7 +7614,15 @@
label: 'label.change.service.offering',
createForm: {
title: 'label.change.service.offering',
desc: 'Please read the dynamic scaling section in the admin guide before scaling up.',
desc: function(args) {
var description = '';
var vmObj = args.jsonObj;
//if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { //needs to wait for API fix that will return hypervisor property
if (vmObj.state == 'Running') {
description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
}
return description;
},
fields: {
serviceOfferingId: {
label: 'label.compute.offering',
@ -8155,7 +8171,15 @@
label: 'label.change.service.offering',
createForm: {
title: 'label.change.service.offering',
desc: 'Please read the dynamic scaling section in the admin guide before scaling up.',
desc: function(args) {
var description = '';
var vmObj = args.jsonObj;
//if (vmObj.state == 'Running' && vmObj.hypervisor == 'VMware') { //needs to wait for API fix that will return hypervisor property
if (vmObj.state == 'Running') {
description = 'Please read the dynamic scaling section in the admin guide before scaling up.';
}
return description;
},
fields: {
serviceOfferingId: {
label: 'label.compute.offering',