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/volume-upload to a25d774
Date Mon, 26 Jan 2015 22:50:56 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/volume-upload c16d5a822 -> a25d77473


CLOUDSTACK-8182: UI > volumes > upload volume from URL > add Custom Disk Offering
field which is optional.


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

Branch: refs/heads/volume-upload
Commit: a25d77473d4ca3c092b4fc5749d3a49ff881d805
Parents: c16d5a8
Author: Jessica Wang <jessicawang@apache.org>
Authored: Mon Jan 26 14:50:34 2015 -0800
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Mon Jan 26 14:50:34 2015 -0800

----------------------------------------------------------------------
 ui/scripts/storage.js | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a25d7747/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index bf832c2..d852bdc 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -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


Mime
View raw message