-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40186/
-----------------------------------------------------------
Review request for Ambari and Jaimin Jetly.
Bugs: AMBARI-11974
https://issues.apache.org/jira/browse/AMBARI-11974
Repository: ambari
Description
-------
As currently implemented, the name of the function in the Python script is
shown as it is in the Ambari web UI for the custom command:
<customCommand>
<name>Remove_Sample_Data</name>
<commandScript>
<script>scripts/server.py</script>
<scriptType>PYTHON</scriptType>
<timeout>600</timeout>
</commandScript>
</customCommand>
It would be more convenient to git UI the ability to display a label so that
the menu item would look like "Remove Sample Data" instead of
"Remove_Sample_Data".
Ambari web UI does not usually ask for a display label, it mostly uses
conventions over configurations. To follow this design, I propose to introduce
a set of conventions for the custom command names that UI can convert to more
normalized labels. Ambari web UI is already doing a similar normalization
process for the component property names.
Rules
You may separate the custom command name by "-", "_", or " ", UI will convert
them as shown in the example below
Name:APP_TIMELINE_SERVER >> converted:App Timeline Server
Name:app_timeline_server >> converted:App Timeline Server
Name:aPp_tImeline_sErver >> converted:App Timeline Server
Name:APP-TIMELINE-SERVER >> converted:App Timeline Server
Name:app-timeline-server >> converted:App Timeline Server
Name:aPp-tImeline-sErver >> converted:App Timeline Server
Name:APP TIMELINE SERVER >> converted:App Timeline Server
Name:app timeline server >> converted:App Timeline Server
Name:aPp tImeline sErver >> converted:App Timeline Server
Name:FALCON >> converted:Falcon
Name:falcon >> converted:Falcon
Diffs
-----
ambari-web/app/utils/helper.js 0f4a5c3
ambari-web/app/views/main/host/details/host_component_view.js 0335234
ambari-web/app/views/main/service/item.js bfa98ca
ambari-web/test/utils/helper_test.js 62acf58
ambari-web/test/views/main/host/details/host_component_view_test.js 75cf476
Diff: https://reviews.apache.org/r/40186/diff/
Testing
-------
1. new UI unit test
2. Add custom commands to open source components deployed on an Ambari cluster
(for example, HDFS)
Patched ambari UI with the UI change, to see the custom commands are
displayed in both the Service Action drop down list for the entire server as
well as the action drop-down list for the NameNode.
Thanks,
Di Li