[
https://issues.apache.org/jira/browse/AMBARI-11964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004659#comment-15004659
]
Di Li commented on AMBARI-11964:
--------------------------------
Ambari backend already has such attribute defined for each configType (JIRA
AMBARI-7404). It's called "supports_adding_forbidden". The same as
"supports_final", you need to set it at the configType level. For example, if
you want Ambari web UI to not show Custom hdfs-site for HDFS, you should have
the "configuration" section set like this <configuration supports_final="true"
supports_adding_forbidden="true">, in the hdfs-site.xml.
The issue here is that even though the Ambari server backend sends this
information to the UI as a JSON string, UI currently does not process it, thus
no show/hide Custom *** sections behavior observed even when the attribute is
set to true.
The patch here proposed a fix to have the UI process the value and show/hide
Custom *** sections accordingly.
> Allow services to hide "custom" configurations
> ----------------------------------------------
>
> Key: AMBARI-11964
> URL: https://issues.apache.org/jira/browse/AMBARI-11964
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-server
> Affects Versions: 2.2.0
> Reporter: Dmitry Vasilenko
> Assignee: Di Li
> Labels: feature_custom_service
>
> Currently, the logic to hide custom configuration sections in the web UI is
> hardcoded in the /ambari-web/app/models/stack_service.js
> {noformat}
> // Add custom section for every configType to all the services
> configTypes.forEach(function (type) {
> var configTypesWithNoCustomSection =
> ['capacity-scheduler','mapred-queue-acls','flume-conf',
> 'pig-properties','topology','users-ldif'];
> if (type.endsWith('-env') || type.endsWith('-log4j') ||
> configTypesWithNoCustomSection.contains(type)) {
> return;
> }
> {noformat}
> It will be beneficial to have a declarative way for the Ambari services to
> hide the custom configuration section in the web UI for the given
> configuration XML.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)