cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject [2/2] git commit: updated refs/heads/object_store to 57049d5
Date Fri, 24 May 2013 00:09:42 GMT
CLOUDSTACK-2538: object_store - UI - Infrastrcuture menu - secondary storages page - add secondary
storage step - add name field.


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

Branch: refs/heads/object_store
Commit: 57049d5aef56f0f5f7b75e0c289fa8618275d745
Parents: c163846
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu May 23 17:08:37 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu May 23 17:08:37 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/57049d5a/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index ea44371..76f797c 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -10929,7 +10929,8 @@
               createForm: {
                 title: 'label.add.secondary.storage',
                                
-                fields: {                  
+                fields: {   
+                  name: { label: 'label.name' },
                   provider: {
                     label: 'Provider',
                     select: function(args){                  
@@ -10970,6 +10971,8 @@
                               $form.find('.form-item[rel=connectiontimeout]').hide();
                               $form.find('.form-item[rel=maxerrorretry]').hide();
                               $form.find('.form-item[rel=sockettimeout]').hide();
+                              
+                              $form.find('.form-item[rel=createNfsCache]').find('input').removeAttr('checked');
                               $form.find('.form-item[rel=createNfsCache]').hide();
                               $form.find('.form-item[rel=nfsCacheZoneid]').hide();
                               $form.find('.form-item[rel=nfsCacheNfsServer]').hide();
@@ -11025,6 +11028,8 @@
                               $form.find('.form-item[rel=connectiontimeout]').hide();
                               $form.find('.form-item[rel=maxerrorretry]').hide();
                               $form.find('.form-item[rel=sockettimeout]').hide();
+                              
+                              $form.find('.form-item[rel=createNfsCache]').find('input').removeAttr('checked');
                               $form.find('.form-item[rel=createNfsCache]').hide();
                               $form.find('.form-item[rel=nfsCacheZoneid]').hide();
                               $form.find('.form-item[rel=nfsCacheNfsServer]').hide();
@@ -11163,17 +11168,24 @@
               },
 
               action: function(args) {
+                var data = {};
+                if(args.data.name != null && args.data.name.length > 0) {
+                  $.extend(data, {
+                    name: args.data.name
+                  });
+                }
+                
                 if(args.data.provider == 'NFS') {
                   var zoneid = args.data.zoneid;
                   var nfs_server = args.data.nfsServer;
                   var path = args.data.path;
                   var url = nfsURL(nfs_server, path);
                   
-                  var data = {
+                  $.extend(data, {
                     provider: args.data.provider,
                     zoneid: zoneid,
                     url: url                    
-                  };
+                  });                                    
                     
                   $.ajax({
                     url: createURL('addImageStore'),
@@ -11191,7 +11203,7 @@
                   });
                 }
                 else if(args.data.provider == 'S3') {                  
-                  var data = {
+                  $.extend(data, {
                     provider: args.data.provider,                                       
   
                     'details[0].key': 'accesskey',
                     'details[0].value': args.data.accesskey,                            
               
@@ -11201,7 +11213,8 @@
                     'details[2].value': args.data.bucket,
                     'details[3].key': 'usehttps',
                     'details[3].value': (args.data.usehttps != null && args.data.usehttps
== 'on' ? 'true' : 'false')
-                  };                  
+                  });
+                                              
                   var index = 4;
                   if(args.data.endpoint != null && args.data.endpoint.length >
0){
                     data['details[' + index.toString() + '].key'] = 'endpoint';
@@ -11264,10 +11277,11 @@
                   }   
                 }
                 else if(args.data.provider == 'Swift') {
-                  var data = {
+                  $.extend(data, {
                     provider: args.data.provider,
                     url: args.data.url
-                  };                 
+                  });
+                                               
                   var index = 0;
                   if(args.data.account != null && args.data.account.length > 0){
                     data['details[' + index.toString() + '].key'] = 'account';


Mime
View raw message