Repository: ambari Updated Branches: refs/heads/branch-2.4 ac6dc9a76 -> d475f4155
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/d475f415 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d475f415 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d475f415 Branch: refs/heads/branch-2.4 Commit: d475f4155706b52a4c6660d570b305de23e9e589 Parents: ac6dc9a Author: Jaimin Jetly <[email protected]> Authored: Tue Nov 8 14:39:08 2016 -0800 Committer: Jaimin Jetly <[email protected]> Committed: Tue Nov 8 14:39:08 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/d475f415/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/d475f415/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/d475f415/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');
