ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [04/13] ambari git commit: AMBARI-18816. Ranger install asks to populate AD domain and marks its required when no AD is in play. (jaimin)
Date Wed, 09 Nov 2016 21:50:01 GMT
AMBARI-18816. Ranger install asks to populate AD domain and marks its required when no AD is
in play. (jaimin)


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

Branch: refs/heads/branch-feature-AMBARI-18634
Commit: cea8602ad55b35579f6456272d4527d2cc4e581a
Parents: 1606016
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Tue Nov 8 14:39:08 2016 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Tue Nov 8 14:45:34 2016 -0800

----------------------------------------------------------------------
 ambari-web/app/data/custom_stack_map.js |  2 +-
 ambari-web/app/utils/config.js          |  8 ++++----
 ambari-web/test/utils/config_test.js    | 22 ++++++++++++++++++++++
 3 files changed, 27 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cea8602a/ambari-web/app/data/custom_stack_map.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/custom_stack_map.js b/ambari-web/app/data/custom_stack_map.js
index 33b642c..e52c570 100644
--- a/ambari-web/app/data/custom_stack_map.js
+++ b/ambari-web/app/data/custom_stack_map.js
@@ -52,7 +52,7 @@ module.exports = [
   {
     "stackName": "HDF",
     "stackVersionNumber": "2.0",
-    "sign": "=",
+    "sign": ">=",
     "baseStackFolder": "HDP2.3"
   }
 ];

http://git-wip-us.apache.org/repos/asf/ambari/blob/cea8602a/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index b84b406..665497b 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -158,15 +158,15 @@ App.config = Em.Object.create({
     var
       baseStackFolder = App.get('currentStackName'),
       singMap = {
-        "1": ">",
-        "-1": "<",
-        "0": "="
+        "1": [">", ">="],
+        "-1": ["<", "<="],
+        "0": ["=", ">=","<="]
       };
 
     this.get('customStackMapping').every(function (stack) {
       if(stack.stackName == App.get('currentStackName')){
         var versionCompare = Em.compare(App.get('currentStackVersionNumber'), stack.stackVersionNumber);
-        if(singMap[versionCompare+""] === stack.sign){
+        if(singMap[versionCompare+""].contains(stack.sign)){
           baseStackFolder = stack.baseStackFolder;
           return false;
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cea8602a/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index bb54239..5012caa 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -199,6 +199,28 @@ describe('App.config', function() {
     });
   });
 
+  describe('#mapCustomStack', function() {
+    before(function() {
+      setups.setupStackVersion(this, 'HDF-2.2');
+    });
+
+    it('versions of HDF > 2.0 should map with HDP 2.3 stack based property definitions',
function() {
+      var baseStackFolder = App.config.mapCustomStack();
+      expect(baseStackFolder).to.equal("HDP2.3");
+    });
+
+    it('versions of HDF = 2.0 should map with HDP 2.3 stack based property definitions',
function() {
+      App.set('currentStackVersion', 'HDF-2.0');
+      var baseStackFolder = App.config.mapCustomStack();
+      expect(baseStackFolder).to.equal("HDP2.3");
+    });
+
+
+    after(function() {
+      setups.restoreStackVersion(this);
+    });
+  });
+
   describe('#preDefinedConfigFile', function() {
     before(function() {
       setups.setupStackVersion(this, 'BIGTOP-0.8');


Mime
View raw message