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/09/08 17:51:22 UTC
ambari git commit: AMBARI-13033. Add Service Wizard:After populating
KMS properties, Ranger tab shows up as missing 2 properties (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 520a601da -> 8f4513819
AMBARI-13033. Add Service Wizard:After populating KMS properties, Ranger tab shows up as missing 2 properties (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f451381
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f451381
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f451381
Branch: refs/heads/branch-2.1
Commit: 8f45138195f5aec58ef974e1d253fa9e414d1c3d
Parents: 520a601
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Sep 8 18:49:03 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Tue Sep 8 18:49:03 2015 +0300
----------------------------------------------------------------------
.../app/models/configs/objects/service_config.js | 16 ++++++++++++++++
ambari-web/app/views/common/controls_view.js | 13 ++-----------
2 files changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8f451381/ambari-web/app/models/configs/objects/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config.js b/ambari-web/app/models/configs/objects/service_config.js
index 507fbb5..492f1c0 100644
--- a/ambari-web/app/models/configs/objects/service_config.js
+++ b/ambari-web/app/models/configs/objects/service_config.js
@@ -40,6 +40,22 @@ App.ServiceConfig = Ember.Object.extend({
_category.set('nonSlaveErrorCount', 0);
});
configs.forEach(function (item) {
+ if (item.get('isVisible')) {
+ var options = item.get('options');
+ if (options && options.someProperty('foreignKeys')) {
+ var options = options.filterProperty('foreignKeys');
+ options.forEach(function (opt) {
+ opt.foreignKeys.forEach(function (key) {
+ var config = configs.findProperty('name', key);
+ if (config) {
+ config.set('isVisible', item.get('value') === opt.displayName);
+ }
+ });
+ });
+ }
+ }
+ });
+ configs.forEach(function (item) {
var category = configCategories.findProperty('name', item.get('category'));
if (category && !item.get('isValid') && item.get('isVisible') && !item.get('widget')) {
category.incrementProperty('nonSlaveErrorCount');
http://git-wip-us.apache.org/repos/asf/ambari/blob/8f451381/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 65bbd95..4b671d4 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -746,17 +746,8 @@ App.ServiceConfigRadioButton = Ember.Checkbox.extend({
console.debug('App.ServiceConfigRadioButton.onChecked');
this.set('parentView.serviceConfig.value', this.get('value'));
var components = this.get('parentView.serviceConfig.options');
- if (components) {
- components.forEach(function (_component) {
- if (_component.foreignKeys) {
- _component.foreignKeys.forEach(function (_componentName) {
- if (this.get('parentView.parentView.serviceConfigs') && this.get('parentView.parentView.serviceConfigs').someProperty('name', _componentName)) {
- var component = this.get('parentView.parentView.serviceConfigs').findProperty('name', _componentName);
- component.set('isVisible', _component.displayName === this.get('value'));
- }
- }, this);
- }
- }, this);
+ if (components && components.someProperty('foreignKeys')) {
+ this.get('controller.stepConfigs').findProperty('serviceName', this.get('parentView.serviceConfig.serviceName')).propertyDidChange('errorCount');
}
});
}.observes('checked'),