mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
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.
This commit is contained in:
parent
db8d5f602a
commit
c1101eb695
@ -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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user