Updated Branches:
  refs/heads/4.3 019316b00 -> 3ed7831d8

CLOUDSTACK-5139: UI > zone wizard > secondary storage step > providers dropdown 
- hardcode options instead of get them from listStorageProviders&type=image 
since not all of returned values are handled by UI (e.g. "NetApp" is not 
handled by UI).


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

Branch: refs/heads/4.3
Commit: 3ed7831d876b2aee02a7c162ae3c6067b0e1672a
Parents: 019316b
Author: Jessica Wang <[email protected]>
Authored: Wed Dec 4 15:01:38 2013 -0800
Committer: Jessica Wang <[email protected]>
Committed: Wed Dec 4 15:01:38 2013 -0800

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js | 28 +++++++++-------------------
 1 file changed, 9 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ed7831d/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 42fa799..5437fe4 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1838,25 +1838,15 @@
                                                if(s3stores != null && 
s3stores.length > 0) {                                                   
                                                        storageproviders.push({ 
id: 'S3', description: 'S3'}); //if (region-wide) S3 store exists already, only 
"S3" option should be included here. Any other type of store is not allowed to 
be created since cloudstack doesn't support multiple types of store at this 
point. 
                                                } else {
-                                                       $.ajax({
-                                            url: 
createURL('listStorageProviders'),
-                                            data: {
-                                                type: 'image'
-                                            },
-                                            async: false,
-                                            success: function(json) {
-                                                var objs = 
json.liststorageprovidersresponse.dataStoreProvider;                            
                    
-                                                if (objs != null) {
-                                                    for (var i = 0; i < 
objs.length; i++) {    
-                                                       storageproviders.push({
-                                                            id: objs[i].name,
-                                                            description: 
objs[i].name
-                                                        });
-                                                    }
-                                                }                              
      
-                                            }
-                                        });
-                                                       storageproviders.push({ 
id: 'SMB', description: 'SMB/cifs'}); //temporary, before Rajesh adds 'SMB' to 
listStorageProviders API response.                                        
+                                                       /*                      
                                  
+                                       UI no longer gets providers from 
"listStorageProviders&type=image" because:
+                                       (1) Not all of returned values are 
handled by UI (e.g. Provider "NetApp" is not handled by UI).
+                                       (2) Provider "SMB" which is handled by 
UI is not returned from "listStorageProviders&type=image" 
+                                       */
+                                                       storageproviders.push({ 
id: 'NFS', description: 'NFS'});
+                                                       storageproviders.push({ 
id: 'SMB', description: 'SMB/cifs'});
+                                                       storageproviders.push({ 
id: 'S3', description: 'S3'});
+                                                       storageproviders.push({ 
id: 'Swift', description: 'Swift'});                                            
        
                                                }                               
                                                
                                     args.response.success({
                                         data: storageproviders

Reply via email to