cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [3/6] git commit: updated refs/heads/4.7 to d13ff88
Date Thu, 21 Apr 2016 20:31:32 GMT
CLOUDSTACK-9172 Added cross zones check to delete template and iso


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

Branch: refs/heads/4.7
Commit: cfd2ce71edbab431412f48b14011c8a137df1d22
Parents: e3e5be8
Author: Patrick Dube <pdube@cloudops.com>
Authored: Wed Apr 20 16:16:32 2016 -0400
Committer: Patrick Dube <pdube@cloudops.com>
Committed: Wed Apr 20 16:16:32 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cfd2ce71/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index c8c5b89..fb01334 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -1451,8 +1451,12 @@
                                                      }
                                                  },
                                                  action: function(args) {
+                                                     var queryParams = "deleteTemplate&id="
+ args.context.templates[0].id;
+                                                     if (!args.context.templates[0].crossZones){
+                                                        queryParams += "&zoneid=" + args.context.zones[0].zoneid;
+                                                     }
                                                      $.ajax({
-                                                         url: createURL("deleteTemplate&id="
+ args.context.templates[0].id + "&zoneid=" + args.context.zones[0].zoneid),
+                                                         url: createURL(queryParams),
                                                          dataType: "json",
                                                          async: true,
                                                          success: function(json) {
@@ -2536,12 +2540,12 @@
                                                 }
                                             },
                                             action: function(args) {
-                                                var array1 = [];
-                                                if (args.context.zones[0].zoneid != null)
-                                                    array1.push("&zoneid=" + args.context.zones[0].zoneid);
-
+                                                var queryParams = "deleteIso&id=" + args.context.isos[0].id;
+                                                if (!args.context.isos[0].crossZones){
+                                                    queryParams += "&zoneid=" + args.context.zones[0].zoneid;
+                                                }
                                                 $.ajax({
-                                                    url: createURL("deleteIso&id=" +
args.context.isos[0].id + "&zoneid=" + args.context.zones[0].zoneid),
+                                                    url: createURL(queryParams),
                                                     dataType: "json",
                                                     async: true,
                                                     success: function(json) {


Mime
View raw message