mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-8182: UI > volumes > upload volume from URL > add Custom Disk Offering field which is optional.
This commit is contained in:
parent
c16d5a8221
commit
a25d77473d
@ -328,6 +328,36 @@
|
||||
data: items
|
||||
});
|
||||
}
|
||||
},
|
||||
diskOffering: {
|
||||
label: 'Custom Disk Offering',
|
||||
docID: 'helpVolumeDiskOffering',
|
||||
select: function(args) {
|
||||
var diskofferingObjs;
|
||||
$.ajax({
|
||||
url: createURL("listDiskOfferings"),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
diskofferingObjs = json.listdiskofferingsresponse.diskoffering;
|
||||
var items = [{
|
||||
id: '',
|
||||
description: ''
|
||||
}];
|
||||
$(diskofferingObjs).each(function() {
|
||||
if (this.iscustomized == true) {
|
||||
items.push({
|
||||
id: this.id,
|
||||
description: this.displaytext
|
||||
});
|
||||
}
|
||||
});
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
checksum: {
|
||||
docID: 'helpUploadVolumeChecksum',
|
||||
@ -344,6 +374,12 @@
|
||||
url: args.data.url
|
||||
};
|
||||
|
||||
if (args.data.diskOffering != '' && args.data.diskOffering.length > 0) {
|
||||
$.extend(data, {
|
||||
diskofferingid: args.data.diskOffering
|
||||
});
|
||||
}
|
||||
|
||||
if (args.data.checksum != null && args.data.checksum.length > 0) {
|
||||
$.extend(data, {
|
||||
checksum: args.data.checksum
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user