cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/4.3 to cda040a
Date Mon, 30 Dec 2013 22:51:55 GMT
Updated Branches:
  refs/heads/4.3 7d02fcd5b -> cda040af2


CLOUDSTACK-5606: UI > copy template, copy ISO action > when a template/ISO to be copied
is not associated with a specific zone, UI does not pass sourcezoneid parameter to API.


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

Branch: refs/heads/4.3
Commit: cda040af2d7b253a6f1fb5e83ef368a8ba236a6c
Parents: 7d02fcd
Author: Jessica Wang <jessicawang@apache.org>
Authored: Mon Dec 30 14:51:35 2013 -0800
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Mon Dec 30 14:51:35 2013 -0800

----------------------------------------------------------------------
 ui/scripts/templates.js | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cda040af/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 286ee26..49817b1 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -781,11 +781,20 @@
                                         }
                                     }
                                 },
-                                action: function(args) {
-                                    $.ajax({
-                                        url: createURL("copyTemplate&id=" + args.context.templates[0].id
+ "&sourcezoneid=" + args.context.templates[0].zoneid + "&destzoneid=" + args.data.destinationZoneId),
-                                        dataType: "json",
-                                        async: true,
+                                action: function(args) {                                
   
+                                    var data = {
+                                    	id: args.context.templates[0].id,
+                                    	destzoneid: args.data.destinationZoneId
+                                    };                                	
+                                    if (args.context.templates[0].zoneid != undefined) {
+                                        $.extend(data, {
+                                        	sourcezoneid: args.context.templates[0].zoneid
+                                        });	
+                                    }                                    
+                                    
+                                	$.ajax({
+                                        url: createURL('copyTemplate'),
+                                        data: data,                                     
  
                                         success: function(json) {
                                             var jid = json.copytemplateresponse.jobid;
                                             args.response.success({
@@ -1543,11 +1552,20 @@
                                         }
                                     }
                                 },
-                                action: function(args) {
-                                    $.ajax({
-                                        url: createURL("copyIso&id=" + args.context.isos[0].id
+ "&sourcezoneid=" + args.context.isos[0].zoneid + "&destzoneid=" + args.data.destinationZoneId),
-                                        dataType: "json",
-                                        async: true,
+                                action: function(args) {                                
   
+                                    var data = {
+                                    	id: args.context.isos[0].id,
+                                    	destzoneid: args.data.destinationZoneId
+                                    };                                	
+                                    if (args.context.isos[0].zoneid != undefined) {
+                                        $.extend(data, {
+                                        	sourcezoneid: args.context.isos[0].zoneid
+                                        });	
+                                    }                                    
+                                	
+                                	$.ajax({
+                                        url: createURL('copyIso'),
+                                        data: data,
                                         success: function(json) {
                                             var jid = json.copytemplateresponse.jobid;
                                             args.response.success({


Mime
View raw message