Repository: ambari Updated Branches: refs/heads/trunk 55c150be1 -> 37fb051ae
AMBARI-13653 Ranger authentication method when updated via recommendation API doe not change the related accordion. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/227bd813 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/227bd813 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/227bd813 Branch: refs/heads/trunk Commit: 227bd813e5ce0ee6aaec6d77e127d02f580ce638 Parents: 55c150b Author: aBabiichuk <ababiic...@cybervisiontech.com> Authored: Fri Oct 30 12:18:42 2015 +0200 Committer: aBabiichuk <ababiic...@cybervisiontech.com> Committed: Fri Oct 30 12:22:36 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/views/common/controls_view.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/227bd813/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 b305249..9f3d2ca 100644 --- a/ambari-web/app/views/common/controls_view.js +++ b/ambari-web/app/views/common/controls_view.js @@ -775,13 +775,9 @@ App.ServiceConfigRadioButton = Ember.Checkbox.extend(App.SupportsDependentConfig if (this.get('clicked')) { this.sendRequestRorDependentConfigs(this.get('parentView.serviceConfig')); Em.run.next(this, function() { - console.debug('App.ServiceConfigRadioButton.onChecked'); this.set('parentView.serviceConfig.value', this.get('value')); - var components = this.get('parentView.serviceConfig.options'); - if (components && components.someProperty('foreignKeys')) { - this.get('controller.stepConfigs').findProperty('serviceName', this.get('parentView.serviceConfig.serviceName')).propertyDidChange('errorCount'); - } this.set('clicked', false); + this.updateForeignKeys(); }); } }.observes('checked'), @@ -789,9 +785,18 @@ App.ServiceConfigRadioButton = Ember.Checkbox.extend(App.SupportsDependentConfig updateCheck: function() { if (!this.get('clicked')) { this.set('checked', this.get('parentView.serviceConfig.value') === this.get('value')); + this.updateForeignKeys(); } }.observes('parentView.serviceConfig.value'), + updateForeignKeys: function() { + var components = this.get('parentView.serviceConfig.options'); + if (components && components.someProperty('foreignKeys')) { + this.get('controller.stepConfigs').findProperty('serviceName', this.get('parentView.serviceConfig.serviceName')).propertyDidChange('errorCount'); + } + }, + + disabled: function () { return !this.get('parentView.serviceConfig.isEditable') || !['addServiceController', 'installerController'].contains(this.get('controller.wizardController.name')) && /^New\s\w+\sDatabase$/.test(this.get('value'));