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/94932c99 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94932c99 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94932c99 Branch: refs/heads/branch-dev-patch-upgrade Commit: 94932c99bb8ff5ad309c15c6a0ecf382f428c73b Parents: dc8e5c3 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:13 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/94932c99/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/94932c99/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/94932c99/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 9858b75..e9eaed2 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 @@ -434,6 +434,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]); + } } } }