You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/05/20 19:04:58 UTC
ambari git commit: AMBARI-11273. "Save" configs button is not enabled
after making changes on YARN and HBase. (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 6c7f47c36 -> a40b2b691
AMBARI-11273. "Save" configs button is not enabled after making changes on YARN and HBase. (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a40b2b69
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a40b2b69
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a40b2b69
Branch: refs/heads/trunk
Commit: a40b2b69187baec4db721386243cda3a3aba715e
Parents: 6c7f47c
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed May 20 19:57:01 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed May 20 20:04:55 2015 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/configs.js | 3 ++-
.../test/controllers/main/service/info/config_test.js | 9 ++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a40b2b69/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 a48f40b..dd6e437 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1233,7 +1233,8 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
* @method getMasterComponentHostValue
*/
getMasterComponentHostValue: function (componentName, multiple) {
- var components = this.get('content.hostComponents').filterProperty('componentName', componentName);
+ var components = App.HostComponent.find().filterProperty('componentName', componentName);
+
if (components.length > 0) {
return multiple ? components.mapProperty('hostName') : components[0].get('hostName');
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/a40b2b69/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 320edc8..b895ed6 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ b/ambari-web/test/controllers/main/service/info/config_test.js
@@ -382,13 +382,12 @@ describe("App.MainServiceInfoConfigsController", function () {
}
];
tests.forEach(function(t){
- beforeEach(function () {
- mainServiceInfoConfigsController.set("content", { hostComponents: []});
- });
-
it(t.m, function () {
- mainServiceInfoConfigsController.set("content.hostComponents", t.content.hostComponents);
+ sinon.stub(App.HostComponent, 'find', function(){
+ return t.content.hostComponents;
+ });
expect(mainServiceInfoConfigsController.getMasterComponentHostValue(t.content.hostComponents[0].componentName, t.multiple)).to.eql(t.result);
+ App.HostComponent.find.restore();
});
});
});