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/master to c1101eb
Date Mon, 30 Dec 2013 22:52:38 GMT
Updated Branches:
  refs/heads/master db8d5f602 -> c1101eb69


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/c1101eb6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c1101eb6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c1101eb6

Branch: refs/heads/master
Commit: c1101eb695e4d1ea201ccd884a3acceb2539b201
Parents: db8d5f6
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:52:27 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1101eb6/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 0f8f115..8c63ce2 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -795,11 +795,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({
@@ -1557,11 +1566,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