You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/09/01 15:38:26 UTC

ambari git commit: AMBARI-12958 SQLA: when "db name" for hive/oozie changed, "jdbc class" changes too so recommendations should be called. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 7ffd863e4 -> a7dfbfa45


AMBARI-12958 SQLA: when "db name" for hive/oozie changed, "jdbc class" changes too so recommendations should be called. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a7dfbfa4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a7dfbfa4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a7dfbfa4

Branch: refs/heads/trunk
Commit: a7dfbfa45c274aec6d4bd24c676b8ec8b8c7a689
Parents: 7ffd863
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Sep 1 16:36:25 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Sep 1 16:36:25 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/controls_view.js       | 3 ++-
 ambari-web/test/views/common/controls_view_test.js | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a7dfbfa4/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index c37a60d..4933a23 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -90,7 +90,7 @@ App.SupportsDependentConfigs = Ember.Mixin.create({
    * @returns {$.Deferred}
    */
   sendRequestRorDependentConfigs: function(config) {
-    if (!config.get('isValid')) return $.Deferred().resolve().promise();
+    if (!config || !config.get('isValid')) return $.Deferred().resolve().promise();
     if (App.get('isClusterSupportsEnhancedConfigs') && ['mainServiceInfoConfigsController','wizardStep7Controller'].contains(this.get('controller.name'))) {
       var name = config.get('name');
       var saveRecommended = (this.get('config.value') === this.get('config.recommendedValue'));
@@ -505,6 +505,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId,
   }.property('serviceConfig.serviceName', 'serviceConfig.value'),
 
   onOptionsChange: function () {
+    this.sendRequestRorDependentConfigs(this.get('serviceConfig'));
     if (this.get('hostNameProperty') && !this.get('nonDBRadioButtons').contains(this.get('serviceConfig.name'))) {
       /** if new db is selected host name must be same as master of selected service (and can't be changed)**/
       if (this.get('isNewDb')) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a7dfbfa4/ambari-web/test/views/common/controls_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/controls_view_test.js b/ambari-web/test/views/common/controls_view_test.js
index a2df365..6e4315c 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -251,6 +251,7 @@ describe('App.ServiceConfigRadioButtons', function () {
 
     afterEach(function () {
       App.get.restore();
+      view.sendRequestRorDependentConfigs.restore();
     });
 
     after(function () {
@@ -261,6 +262,7 @@ describe('App.ServiceConfigRadioButtons', function () {
       it(item.title, function () {
         sinon.stub(App, 'get').withArgs('currentStackName').returns('HDP').withArgs('currentStackVersion').returns(item.currentStackVersion);
         view = App.ServiceConfigRadioButtons.create({parentView: item.parentView});
+        sinon.stub(view, 'sendRequestRorDependentConfigs', Em.K);
         view.setProperties({
           categoryConfigsAll: item.parentView.get('serviceConfigs'),
           serviceConfig: item.serviceConfig