You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sw...@apache.org on 2016/04/21 22:33:11 UTC
[3/8] git commit: updated refs/heads/master to 37afba0
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/master
Commit: cfd2ce71edbab431412f48b14011c8a137df1d22
Parents: e3e5be8
Author: Patrick Dube <pd...@cloudops.com>
Authored: Wed Apr 20 16:16:32 2016 -0400
Committer: Patrick Dube <pd...@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) {