> On Nov. 17, 2015, 8 p.m., Jaimin Jetly wrote:
> > ambari-web/app/views/common/configs/service_config_view.js, lines 157-158
> > <https://reviews.apache.org/r/40311/diff/1/?file=1125351#file1125351line157>
> >
> >     there is a code in stack_service.js at 
> > https://github.com/apache/ambari/blob/trunk/ambari-web/app/models/stack_service.js#L398
> >     
> >     Over here custome section is being removed for any file endinh with 
> > '-env' or '-log4j' and list of hardcoded files. 
> >     
> >     Please make sure that changes done are exclusive to what is being tried 
> > to achieve over here.
> >     
> >     It will be even nicer if you can remove that code and make these file's 
> > custom section disappear with the adding forbidden attribute. so there is 
> > only one way in ambari to make custom section disappear which will be stack 
> > driven

Hello Jaimin,

Thanks for the comments.

The supportAddingForbidden code change does not interfere with the 
stack_service.js change. I did change the stack_service.js code a bit to remove 
the hardcoded list of configTypes. But I left the -env and -log4j logic intact 
in the stack_service.js as I think there is probably a reason for the UI code 
to explicitly disallow Custom xxx sections for -env and -log4j.

With the latest code change, users should expect
1. All -env and -log4j config types will not have the Custom xxx sections.
2. All other config types honor the supports_adding_forbidden attribute for 
show/hide the Custom xxx sections.

Please review the latest patch I just uploaded. 

Thank you.

Di


- Di


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40311/#review106925
-----------------------------------------------------------


On Nov. 17, 2015, 3:14 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40311/
> -----------------------------------------------------------
> 
> (Updated Nov. 17, 2015, 3:14 p.m.)
> 
> 
> Review request for Ambari, Alexandr Antonenko and Jaimin Jetly.
> 
> 
> Bugs: AMBARI-11964
>     https://issues.apache.org/jira/browse/AMBARI-11964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 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 the 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 
> the Custom... sections accordingly.
> 
> 
> Diffs
> -----
> 
>   ambari-web/app/utils/config.js 1fba4d0 
>   ambari-web/app/views/common/configs/service_config_view.js 0ef2112 
>   ambari-web/app/views/common/configs/service_configs_by_category_view.js 
> ffbea76 
>   ambari-web/test/utils/config_test.js e3906af 
>   ambari-web/test/views/common/configs/service_config_view_test.js 1f0cd60 
> 
> Diff: https://reviews.apache.org/r/40311/diff/
> 
> 
> Testing
> -------
> 
> 1. New unit tests.
> 
> 2. Patched a cluster installed with trunk Ambari build, update various 
> ...site.xml to have the supports_adding_forbidden attribute set to true, 
> restart ambari server, reload UI, verify the corresponding Custom... sections 
> are gone.
> 
> 
> Thanks,
> 
> Di Li
> 
>

Reply via email to