You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2014/11/14 22:59:10 UTC

git commit: updated refs/heads/master to 2d4e879

Repository: cloudstack
Updated Branches:
  refs/heads/master e87bb20d0 -> 2d4e87973


CLOUDSTACK-7773: UI > Infrastructure > SystemVMs, Routers > Change Service Offering > service offerings dropdown > populate only service offerings that the VM is allowed to change to. i.e. exclude service offerings that the VM is not allowed to change to.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2d4e8797
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2d4e8797
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2d4e8797

Branch: refs/heads/master
Commit: 2d4e87973d7d20009efe2199aaf69c7d35279d03
Parents: e87bb20
Author: Jessica Wang <je...@apache.org>
Authored: Fri Nov 14 13:58:13 2014 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Fri Nov 14 13:58:35 2014 -0800

----------------------------------------------------------------------
 ui/scripts/system.js | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d4e8797/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 672a6a2..80c608f 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -9798,7 +9798,7 @@
                                         }
                                     },
                                     
-                                    scaleUp: {
+                                    scaleUp: { //*** Infrastructure > Virtual Routers > change service offering ***
                                         label: 'label.change.service.offering',
                                         createForm: {
                                             title: 'label.change.service.offering',
@@ -9819,7 +9819,8 @@
                                                             url: createURL('listServiceOfferings'),
                                                             data: {
                                                                 issystem: true,
-                                                                systemvmtype: 'domainrouter'
+                                                                systemvmtype: 'domainrouter',
+                                                                virtualmachineid: args.context.routers[0].id
                                                             },
                                                             success: function (json) {
                                                                 var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
@@ -11039,7 +11040,7 @@
                                 }
                             },
                             
-                            scaleUp: {
+                            scaleUp: { //*** Infrastructure > System VMs (consoleProxy or SSVM) > change service offering ***
                                 label: 'label.change.service.offering',
                                 createForm: {
                                     title: 'label.change.service.offering',
@@ -11056,14 +11057,23 @@
                                         serviceOfferingId: {
                                             label: 'label.compute.offering',
                                             select: function (args) {
-                                                var apiCmd = "listServiceOfferings&issystem=true";
-                                                if (args.context.systemVMs[0].systemvmtype == "secondarystoragevm")
-                                                apiCmd += "&systemvmtype=secondarystoragevm"; else if (args.context.systemVMs[0].systemvmtype == "consoleproxy")
-                                                apiCmd += "&systemvmtype=consoleproxy";
+                                            	var data1 = {
+                                                    issystem: 'true',
+                                                    virtualmachineid: args.context.systemVMs[0].id
+                                                };                                                
+                                                if (args.context.systemVMs[0].systemvmtype == "secondarystoragevm") {
+                                                	$.extend(data1, {
+                                                		systemvmtype: 'secondarystoragevm'
+                                                	});
+                                                }
+                                                else if (args.context.systemVMs[0].systemvmtype == "consoleproxy") {
+                                                	$.extend(data1, {
+                                                		systemvmtype: 'consoleproxy'
+                                                	});                                                	
+                                                }
                                                 $.ajax({
-                                                    url: createURL(apiCmd),
-                                                    dataType: "json",
-                                                    async: true,
+                                                    url: createURL('listServiceOfferings'),
+                                                    data: data1,
                                                     success: function (json) {
                                                         var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
                                                         var items =[];