You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Di Li <di...@ca.ibm.com> on 2017/04/05 15:37:35 UTC

Review Request 58211: AMBARI-20674 About to hide the Delete menu item from UI for a given service

-----------------------------------------------------------
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


Re: Review Request 58211: AMBARI-20674 About to hide the Delete menu item from UI for a given service

Posted by Tim Thorpe <tt...@ca.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58211/#review171139
-----------------------------------------------------------


Ship it!




Ship It!

- Tim Thorpe


On April 5, 2017, 3:37 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58211/
> -----------------------------------------------------------
> 
> (Updated April 5, 2017, 3:37 p.m.)
> 
> 
> 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
> 
>


Re: Review Request 58211: AMBARI-20674 About to hide the Delete menu item from UI for a given service

Posted by Sangeeta Ravindran <sa...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58211/#review171157
-----------------------------------------------------------


Ship it!




Ship It!

- Sangeeta Ravindran


On April 5, 2017, 3:37 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58211/
> -----------------------------------------------------------
> 
> (Updated April 5, 2017, 3:37 p.m.)
> 
> 
> 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
> 
>


Re: Review Request 58211: AMBARI-20674 Able to hide the Delete menu item from UI for a given service

Posted by Di Li <di...@ca.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58211/
-----------------------------------------------------------

(Updated April 5, 2017, 6:18 p.m.)


Review request for Ambari, Sangeeta Ravindran and Tim Thorpe.


Summary (updated)
-----------------

AMBARI-20674 Able to hide the Delete menu item from UI for a given service


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