You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Di Li <di...@ca.ibm.com> on 2015/11/11 14:42:22 UTC

Review Request 40186: AMBARI-11974: Display label for the custom action

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


Re: Review Request 40186: AMBARI-11974: Display label for the custom action

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40186/#review106312
-----------------------------------------------------------

Ship it!


Ship It!

- Alejandro Fernandez


On Nov. 12, 2015, 7:25 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40186/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2015, 7:25 p.m.)
> 
> 
> 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
> 
>


Re: Review Request 40186: AMBARI-11974: Display label for the custom action

Posted by Jaimin Jetly <ja...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40186/#review106313
-----------------------------------------------------------

Ship it!


Ship It!

- Jaimin Jetly


On Nov. 12, 2015, 7:25 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40186/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2015, 7:25 p.m.)
> 
> 
> 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
> 
>


Re: Review Request 40186: AMBARI-11974: Display label for the custom action

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

(Updated Nov. 12, 2015, 7:25 p.m.)


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 (updated)
-----

  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


Re: Review Request 40186: AMBARI-11974: Display label for the custom action

Posted by Di Li <di...@ca.ibm.com>.

> On Nov. 12, 2015, 7:01 p.m., Jaimin Jetly wrote:
> > ambari-web/app/views/main/service/item.js, line 218
> > <https://reviews.apache.org/r/40186/diff/1/?file=1123362#file1123362line218>
> >
> >     Lets remove this commented out line from the patch

Patch updated. Thanks Jaimin.


- Di


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


On Nov. 12, 2015, 7:25 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40186/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2015, 7:25 p.m.)
> 
> 
> 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
> 
>


Re: Review Request 40186: AMBARI-11974: Display label for the custom action

Posted by Jaimin Jetly <ja...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40186/#review106299
-----------------------------------------------------------



ambari-web/app/views/main/service/item.js (line 218)
<https://reviews.apache.org/r/40186/#comment165041>

    Lets remove this commented out line from the patch


- Jaimin Jetly


On Nov. 11, 2015, 1:42 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40186/
> -----------------------------------------------------------
> 
> (Updated Nov. 11, 2015, 1:42 p.m.)
> 
> 
> 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
> 
>