AMBARI-18816. Ranger install asks to populate AD domain and marks its required when no AD is in play. (jaimin)
(cherry picked from commit d475f4155706b52a4c6660d570b305de23e9e589) Change-Id: I427afb68b3b9c6cee0445a4f2881a8f198693697 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b2cf2783 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b2cf2783 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b2cf2783 Branch: refs/heads/AMBARI-2.4.2.16 Commit: b2cf27837c83c80a64cbcb5aee5569f1cb4328a3 Parents: c32941b Author: Jaimin Jetly <jai...@hortonworks.com> Authored: Tue Nov 8 14:39:08 2016 -0800 Committer: Zuul <rel...@hortonworks.com> Committed: Tue Nov 8 20:13:38 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/b2cf2783/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/b2cf2783/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index e83d42c..bca8889 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -157,15 +157,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/b2cf2783/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 35d272d..cbb2008 100644 --- a/ambari-web/test/utils/config_test.js +++ b/ambari-web/test/utils/config_test.js @@ -126,6 +126,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');