Repository: ambari Updated Branches: refs/heads/trunk cd2a67c82 -> 9cea058fb
AMBARI-9131 Allow operations during RU via "experimental". (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9cea058f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9cea058f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9cea058f Branch: refs/heads/trunk Commit: 9cea058fb194797c8d91521f035edab6b4e4f3e6 Parents: cd2a67c Author: aBabiichuk <ababiic...@cybervisiontech.com> Authored: Wed Jan 14 21:02:33 2015 +0200 Committer: aBabiichuk <ababiic...@cybervisiontech.com> Committed: Thu Jan 15 09:47:53 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/app.js | 2 +- ambari-web/app/config.js | 3 ++- ambari-web/test/app_test.js | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9cea058f/ambari-web/app/app.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index 339224b..44681a7 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -76,7 +76,7 @@ module.exports = Em.Application.create({ * @return {boolean} */ isAccessible: function (type) { - if (this.get('upgradeState') !== 'INIT' && !type.contains('upgrade_')) { + if (!App.get('supports.opsDuringRollingUpgrade') && this.get('upgradeState') !== 'INIT' && !type.contains('upgrade_')) { return false; } http://git-wip-us.apache.org/repos/asf/ambari/blob/9cea058f/ambari-web/app/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index bdecdfd..8beba79 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -65,7 +65,8 @@ App.supports = { preKerberizeCheck: false, automatedKerberos: true, customizeAgentUserAccount: false, - installGanglia: false + installGanglia: false, + opsDuringRollingUpgrade: false }; if (App.enableExperimental) { http://git-wip-us.apache.org/repos/asf/ambari/blob/9cea058f/ambari-web/test/app_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js index 115797c..f062ce7 100644 --- a/ambari-web/test/app_test.js +++ b/ambari-web/test/app_test.js @@ -409,6 +409,13 @@ describe('App', function () { App.set('isAdmin', true); expect(App.isAccessible('upgrade_ADMIN')).to.be.true; }); + it("Upgrade running, upgrade element should not be blocked", function() { + App.set('upgradeState', "IN_PROGRESS"); + App.set('isAdmin', true); + App.set('supports.opsDuringRollingUpgrade', true); + expect(App.isAccessible('ADMIN')).to.be.true; + App.set('supports.opsDuringRollingUpgrade', false); + }); it("ADMIN type, isAdmin true", function() { App.set('upgradeState', "INIT"); App.set('isAdmin', true);