You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2015/06/03 12:19:06 UTC
ambari git commit: AMBARI-11643. Configs: It is not possible to
reconfigure properties in enhanced configs mode (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk f259fd1d0 -> cf37e4ce2
AMBARI-11643. Configs: It is not possible to reconfigure properties in enhanced configs mode (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf37e4ce
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf37e4ce
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf37e4ce
Branch: refs/heads/trunk
Commit: cf37e4ce20b2d68359d51ddbb131e990a5db2cb1
Parents: f259fd1
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Wed Jun 3 13:16:51 2015 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Wed Jun 3 13:16:51 2015 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/configs.js | 8 +++++---
ambari-web/test/controllers/main/service/info/config_test.js | 7 ++++++-
2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/cf37e4ce/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 007b610..f809c64 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -187,12 +187,14 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
/**
* Determines if Save-button should be disabled
- * Disabled if some configs have invalid values or save-process currently in progress
+ * Disabled if some configs have invalid values for selected service
+ * or save-process currently in progress
+ *
* @type {boolean}
*/
isSubmitDisabled: function () {
- return (!(this.get('stepConfigs').everyProperty('errorCount', 0)) || this.get('saveInProgress'));
- }.property('stepConfigs.@each.errorCount', 'saveInProgress'),
+ return this.get('selectedService').get('errorCount') !== 0 || this.get('saveInProgress');
+ }.property('selectedService.errorCount', 'saveInProgress'),
/**
* Determines if some config value is changed
http://git-wip-us.apache.org/repos/asf/ambari/blob/cf37e4ce/ambari-web/test/controllers/main/service/info/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/info/config_test.js b/ambari-web/test/controllers/main/service/info/config_test.js
index 10affac..defdaf0 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ b/ambari-web/test/controllers/main/service/info/config_test.js
@@ -115,15 +115,20 @@ describe("App.MainServiceInfoConfigsController", function () {
];
beforeEach(function () {
+ sinon.stub(mainServiceInfoConfigsController, "get", function(key) {
+ return key == 'isSubmitDisabled' ? false : Em.get(mainServiceInfoConfigsController, key);
+ });
sinon.stub(mainServiceInfoConfigsController, "restartServicePopup", Em.K);
sinon.stub(mainServiceInfoConfigsController, "getHash", function () {
return "hash"
});
- App.router.route = Em.K;
+ sinon.stub(App.router, "route", Em.K);
});
afterEach(function () {
+ mainServiceInfoConfigsController.get.restore();
mainServiceInfoConfigsController.restartServicePopup.restore();
mainServiceInfoConfigsController.getHash.restore();
+ App.router.route.restore();
});
tests.forEach(function (t) {