ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-8275 Ambari does not allow Heterogenous Storage directory configuration. (ababiichuk)
Date Tue, 11 Nov 2014 15:42:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6c94df6b2 -> 2fdf2403a


AMBARI-8275 Ambari does not allow Heterogenous Storage directory configuration. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 2fdf2403a15c884d877a6f878661d79cda4ffedc
Parents: 6c94df6
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Tue Nov 11 17:16:32 2014 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Tue Nov 11 17:42:22 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/utils/validator.js       | 4 ++--
 ambari-web/test/utils/validator_test.js | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2fdf2403/ambari-web/app/utils/validator.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/validator.js b/ambari-web/app/utils/validator.js
index 09582c4..fb51d4b 100644
--- a/ambari-web/app/utils/validator.js
+++ b/ambari-web/app/utils/validator.js
@@ -62,10 +62,10 @@ module.exports = {
    * @returns {boolean}
    */
   isValidDataNodeDir: function(value) {
-    var floatRegex = /^(\[[0-9a-z]+\])?(\/[0-9a-z]*)/;
+    var dirRegex = /^(\[[0-9a-zA-Z]+\])?(\/[0-9a-z]*)/;
     var dirs = value.replace(/,/g,' ').trim().split(new RegExp("\\s+", "g"));
     for(var i = 0; i < dirs.length; i++){
-      if(!floatRegex.test(dirs[i])){
+      if(!dirRegex.test(dirs[i])){
         return false;
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2fdf2403/ambari-web/test/utils/validator_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/validator_test.js b/ambari-web/test/utils/validator_test.js
index 8a3aa38..93b06cc 100644
--- a/ambari-web/test/utils/validator_test.js
+++ b/ambari-web/test/utils/validator_test.js
@@ -306,6 +306,7 @@ describe('validator', function () {
       {m:'"/abc" - valid',i:'/abc',e:true},
       {m:'"/1a2b3c" - valid',i:'/1a2b3c',e:true},
       {m:'"[ssd]/1a2b3c" - valid',i:'[ssd]/1a2b3c',e:true},
+      {m:'"[DISK]/1a2b3c" - valid',i:'[DISK]/1a2b3c',e:true},
       {m:'"[] /1a2b3c" - invalid',i:'[] /1a2b3c',e:false},
       {m:'"[ssd] /1a2b3c" - invalid',i:'[ssd] /1a2b3c',e:false},
       {m:'"[/1a2b3c]" - invalid',i:'[/1a2b3c]',e:false},


Mime
View raw message