mirror of https://github.com/apache/cloudstack.git
Scale UP VM form functionality for choosing a service offering
This commit is contained in:
parent
b0bbffb79e
commit
48c1c00891
|
|
@ -1082,9 +1082,36 @@
|
|||
|
||||
scaleUp:{
|
||||
label:'scaleUp VM',
|
||||
createForm:{
|
||||
title:'Scale UP Virtual Machine',
|
||||
label:'Scale UP Virtual Machine',
|
||||
fields:{
|
||||
serviceOffering: {
|
||||
label: 'label.compute.offering',
|
||||
select: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listServiceOfferings&VirtualMachineId=" + args.context.instances[0].id),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
|
||||
var items = [];
|
||||
$(serviceofferings).each(function() {
|
||||
items.push({id: this.id, description: this.displaytext});
|
||||
});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id + "&serviceofferingid=" + args.context.instances[0].serviceofferingid),
|
||||
url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id + "&serviceofferingid=" + args.data.serviceOffering),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue