Repository: ambari Updated Branches: refs/heads/branch-2.2 8397565cb -> 7eed58d39
AMBARI-14933 ranger audit db password is required even when audit to db is off.(ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7eed58d3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7eed58d3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7eed58d3 Branch: refs/heads/branch-2.2 Commit: 7eed58d39cbb6f2800c9e96a27e90edc433c726d Parents: 8397565 Author: ababiichuk <ababiic...@hortonworks.com> Authored: Fri Feb 5 09:35:47 2016 +0200 Committer: ababiichuk <ababiic...@hortonworks.com> Committed: Fri Feb 5 11:15:29 2016 +0200 ---------------------------------------------------------------------- .../services/RANGER/themes/theme_version_1.json | 20 +++++++++++++++++++- .../services/RANGER/themes/theme_version_2.json | 20 +++++++++++++++++++- .../configs/widgets/config_widget_view.js | 3 +++ 3 files changed, 41 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7eed58d3/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json index e6724cd..cb5aa78 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/RANGER/themes/theme_version_1.json @@ -525,7 +525,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "subsection-name": "subsection-ranger-audit-db-row2-col2", + "depends-on": [ + { + "configs":[ + "ranger-env/xasecure.audit.destination.db" + ], + "if": "${ranger-env/xasecure.audit.destination.db}", + "then": { + "property_value_attributes": { + "visible": true + } + }, + "else": { + "property_value_attributes": { + "visible": false + } + } + } + ] } ] }, http://git-wip-us.apache.org/repos/asf/ambari/blob/7eed58d3/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json index fff50fb..2c469a9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json @@ -904,7 +904,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "subsection-name": "subsection-ranger-audit-db-row2-col2", + "depends-on": [ + { + "configs":[ + "ranger-env/xasecure.audit.destination.db" + ], + "if": "${ranger-env/xasecure.audit.destination.db}", + "then": { + "property_value_attributes": { + "visible": true + } + }, + "else": { + "property_value_attributes": { + "visible": false + } + } + } + ] }, { "config": "ranger-env/xasecure.audit.destination.solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eed58d3/ambari-web/app/views/common/configs/widgets/config_widget_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js index f0499db..a0515e6 100644 --- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js +++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js @@ -442,6 +442,9 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo var conditionalConfig = serviceConfigs.filterProperty('filename',conditionalConfigFileName).findProperty('name', conditionalConfigName); if (conditionalConfig) { conditionalConfig.set(valueAttribute, valueAttributes[key]); + if (valueAttribute === 'isVisible') { + conditionalConfig.set('hiddenBySection', !valueAttributes[key]); + } } } }