You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2013/04/16 20:34:15 UTC
[10/46] git commit: updated refs/heads/internallb to b7709b8
Scale UP VM form functionality for choosing a service offering
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/48c1c008
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/48c1c008
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/48c1c008
Branch: refs/heads/internallb
Commit: 48c1c008913b0db7e4fde96dadd119a8ad263a6e
Parents: b0bbffb
Author: Pranav Saxena <pr...@citrix.com>
Authored: Mon Apr 15 11:01:59 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Mon Apr 15 11:01:59 2013 +0530
----------------------------------------------------------------------
ui/scripts/instances.js | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48c1c008/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 1c4c38c..21b58ae 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -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) {