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/object_store to a00e30c
Date Tue, 07 May 2013 00:24:20 GMT
Updated Branches:
  refs/heads/object_store eb4965ef6 -> a00e30cb1


CLOUDSTACK-2351: (1) object store - listStorageTypes API has been changed to return 'NFS'.
Here is related UI change. (2) Infrastructure menu - secondary storages- add secondary storage
dialog - fix a bug that this dialog failed to pop up when there is zero zone.


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

Branch: refs/heads/object_store
Commit: a00e30cb16a23a2af754701614bd03670932ce42
Parents: eb4965e
Author: Jessica Wang <jessicawang@apache.org>
Authored: Mon May 6 17:18:49 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Mon May 6 17:18:49 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a00e30cb/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 4daed38..d46cae8 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10381,7 +10381,7 @@
                           var items = [];
                           if(objs != null) {
                             for(var i = 0; i < objs.length; i++){
-                              if(objs[i].name == 'CloudStack ImageStore Provider')
+                              if(objs[i].name == 'NFS')
                                 items.unshift({id: objs[i].name, description: objs[i].name});

                               else
                                 items.push({id: objs[i].name, description: objs[i].name});

@@ -10393,8 +10393,8 @@
                                             
                           args.$select.change(function() {                           
                             var $form = $(this).closest('form');
-                            if($(this).val() == "CloudStack ImageStore Provider") {
-                              //CloudStack ImageStore Provider
+                            if($(this).val() == "NFS") {
+                              //NFS
                               $form.find('.form-item[rel=zoneid]').css('display', 'inline-block');
                               $form.find('.form-item[rel=nfsServer]').css('display', 'inline-block');
                               $form.find('.form-item[rel=path]').css('display', 'inline-block');
@@ -10416,7 +10416,7 @@
                               $form.find('.form-item[rel=key]').hide();
                             }
                             else if ($(this).val() == "S3") {
-                              //CloudStack ImageStore Provider
+                              //NFS
                               $form.find('.form-item[rel=zoneid]').hide();
                               $form.find('.form-item[rel=nfsServer]').hide();
                               $form.find('.form-item[rel=path]').hide();
@@ -10438,7 +10438,7 @@
                               $form.find('.form-item[rel=key]').hide();
                             }
                             else if($(this).val() == "Swift") {
-                              //CloudStack ImageStore Provider
+                              //NFS
                               $form.find('.form-item[rel=zoneid]').hide();
                               $form.find('.form-item[rel=nfsServer]').hide();
                               $form.find('.form-item[rel=path]').hide();
@@ -10468,7 +10468,7 @@
                   },
                   
                   
-                  //CloudStack ImageStore Provider (begin)
+                  //NFS (begin)
                   zoneid: {
                     label: 'Zone',
                     docID: 'helpSecondaryStorageZone',
@@ -10483,14 +10483,19 @@
                         success: function(json) {
                           var zones = json.listzonesresponse.zone;
 
-                          args.response.success({
-                            data: $.map(zones, function(zone) {
-                              return {
-                                id: zone.id,
-                                description: zone.name
-                              };
-                            })
-                          });
+                          if(zones != null){ //$.map(items, fn) - items can not be null
+                            args.response.success({
+                              data: $.map(zones, function(zone) {
+                                return {
+                                  id: zone.id,
+                                  description: zone.name
+                                };
+                              })
+                            });
+                          }
+                          else {
+                            args.response.success({data: null});
+                          }                          
                         }
                       });
                     }
@@ -10505,7 +10510,7 @@
                     docID: 'helpSecondaryStoragePath',
                     validation: { required: true }
                   },
-                  //CloudStack ImageStore Provider (end)
+                  //NFS (end)
                   
                   
                   //S3 (begin)
@@ -10536,7 +10541,7 @@
               },
 
               action: function(args) {
-                if(args.data.provider == 'CloudStack ImageStore Provider') {
+                if(args.data.provider == 'NFS') {
                   var zoneid = args.data.zoneid;
                   var nfs_server = args.data.nfsServer;
                   var path = args.data.path;


Mime
View raw message