Updated Branches:
  refs/heads/master 57167d2ca -> 4c7e0b308

CLOUDSTACK-2120: mixed zone management - UI - storage.js - remove obsolete code 
that has been replaced with new change in global function createURL().


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

Branch: refs/heads/master
Commit: 4c7e0b308a9c2718e5f1eb1bff9a6c9b1f49affe
Parents: 57167d2
Author: Jessica Wang <[email protected]>
Authored: Wed May 1 14:41:39 2013 -0700
Committer: Jessica Wang <[email protected]>
Committed: Wed May 1 14:41:39 2013 -0700

----------------------------------------------------------------------
 ui/scripts/storage.js |   44 ++++++--------------------------------------
 1 files changed, 6 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4c7e0b30/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 9b66083..d73974a 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -89,20 +89,7 @@
                         dataType: "json",
                         async: true,
                         success: function(json) {                              
                                                                 
-                                                                               
                        var zoneObjs;
-                                                                   
if(args.context.zoneType == null || args.context.zoneType == '') { //all types
-                                                                               
                                zoneObjs = json.listzonesresponse.zone;         
        
-                                                                               
                        }
-                                                                               
                        else { //Basic type or Advanced type
-                                                                               
                                zoneObjs = [];
-                                                                               
                                var items = json.listzonesresponse.zone;
-                                                                               
                                if(items != null) {
-                                                                               
                                        for(var i = 0; i < items.length; i++) {
-                                                                               
                                                if(items[i].networktype == 
args.context.zoneType) 
-                                                                               
                                                        zoneObjs.push(items[i]);
-                                                                               
                                        }
-                                                                               
                                }
-                                                                               
                        }                                               
+                                                                               
                        var zoneObjs = json.listzonesresponse.zone;             
                                                                                
                        args.response.success({descriptionField: 'name', data: 
zoneObjs});                                                                     
                                                       
                         }
                       });
@@ -227,20 +214,7 @@
                         dataType: "json",
                         async: true,
                         success: function(json) {                              
                                                                 
-                                                                               
                        var zoneObjs;
-                                                                   
if(args.context.zoneType == null || args.context.zoneType == '') { //all types
-                                                                               
                                zoneObjs = json.listzonesresponse.zone;         
        
-                                                                               
                        }
-                                                                               
                        else { //Basic type or Advanced type
-                                                                               
                                zoneObjs = [];
-                                                                               
                                var items = json.listzonesresponse.zone;
-                                                                               
                                if(items != null) {
-                                                                               
                                        for(var i = 0; i < items.length; i++) {
-                                                                               
                                                if(items[i].networktype == 
args.context.zoneType) 
-                                                                               
                                                        zoneObjs.push(items[i]);
-                                                                               
                                        }
-                                                                               
                                }
-                                                                               
                        }                                               
+                                                                               
                        var zoneObjs = json.listzonesresponse.zone;             
                                                                                
                                                                                
                                                        
                                                                                
                        args.response.success({descriptionField: 'name', data: 
zoneObjs});                                                                     
                                                       
                         }
                       });                                                      
                                
@@ -398,18 +372,12 @@
            
             if(args.context != null) {
               if("instances" in args.context) {
-               $.extend(data, {
-                 virtualMachineId: args.context.instances[0].id
-               });
+                       $.extend(data, {
+                         virtualMachineId: args.context.instances[0].id
+                       });
               }
             }
-
-            if(args.context.zoneType != null && args.context.zoneType.length > 
0) { //Basic type or Advanced type
-              $.extend(data, {
-                zonetype: args.context.zoneType
-              });
-            }
-
+            
             $.ajax({
               url: createURL('listVolumes'),
               data: data,             

Reply via email to