-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58211/
-----------------------------------------------------------
Review request for Ambari, Sangeeta Ravindran and Tim Thorpe.
Bugs: AMBARI-20674
https://issues.apache.org/jira/browse/AMBARI-20674
Repository: ambari
Description
-------
Stack driven approach to have UI show/hide Delete service menu item for a given
service.
A service's metainfo.xml can have
<supportDeleteViaUI>false</supportDeleteViaUI> set at the service level to
indicate UI should hide the menu item. Directly going thru REST API calls are
always supported and non-restricted.
If the section is missing, it will be treated as "support" UI delete service
operation. In other words, UI only hides the menu item if metainfo.xml has
explicitly set the flag to false.
Example.
"<metainfo>" +
" <schemaVersion>2.0</schemaVersion>" +
" <services>" +
" <service>" +
" <name>HDFS</name>" +
" <displayName>HDFS</displayName>" +
" <supportDeleteViaUI>false</supportDeleteViaUI>" +
" </service>" +
" </services>" +
"</metainfo>";
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java
cbff300
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
a30d783
ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java
fd65268
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java
0d0b78b
ambari-server/src/main/resources/properties.json 04d32ea
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceInfoTest.java
1b9296e
ambari-web/app/app.js 9c7d874
ambari-web/app/mappers/stack_service_mapper.js 4bda89d
ambari-web/app/models/host_component.js 3950f97
ambari-web/app/models/stack_service.js 4f21288
ambari-web/test/mappers/stack_service_mapper_test.js 9da8b24
ambari-web/test/views/main/service/item_test.js 4b2e6f9
Diff: https://reviews.apache.org/r/58211/diff/1/
Testing
-------
unit testing
Install a trunk cluster with HDP 2.6 stack.Patch it with the code change both
ambari server and UI change, then update metainfo.xml for hbase in common
services (to test inheritance) verify UI does not show Delete service menu item
for HBase after restart Ambari server.
Thanks,
Di Li