[
https://issues.apache.org/jira/browse/AMBARI-11974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999472#comment-14999472
]
Di Li commented on AMBARI-11974:
--------------------------------
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
> Display label for the custom action
> -----------------------------------
>
> Key: AMBARI-11974
> URL: https://issues.apache.org/jira/browse/AMBARI-11974
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-server
> Affects Versions: 2.1.0
> Reporter: Dmitry Vasilenko
> Assignee: Di Li
> Labels: feature_custom_service
> Fix For: 2.2.0
>
>
> 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:
> {noformat}
> <customCommand>
> <name>Remove_Sample_Data</name>
> <commandScript>
> <script>scripts/server.py</script>
> <scriptType>PYTHON</scriptType>
> <timeout>600</timeout>
> </commandScript>
> </customCommand>
> {noformat}
> It would be more convenient to have a display label in addition to the
> function name so that the menu item would look like "Remove Sample Data"
> instead of "Remove_Sample_Data".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)