cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [16/33] git commit: updated refs/heads/ui-vm-affinity to 2675684
Date Mon, 15 Apr 2013 17:25:08 GMT
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/ui-vm-affinity
Commit: 48c1c008913b0db7e4fde96dadd119a8ad263a6e
Parents: b0bbffb
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Mon Apr 15 11:01:59 2013 +0530
Committer: Pranav Saxena <pranav.saxena@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) {


Mime
View raw message