Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1C0518C09 for ; Thu, 12 Nov 2015 19:33:36 +0000 (UTC) Received: (qmail 61400 invoked by uid 500); 12 Nov 2015 19:33:36 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 61366 invoked by uid 500); 12 Nov 2015 19:33:36 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 61349 invoked by uid 99); 12 Nov 2015 19:33:36 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2015 19:33:36 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id AB2A12C961C; Thu, 12 Nov 2015 19:33:35 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5226903733328685963==" MIME-Version: 1.0 Subject: Re: Review Request 40186: AMBARI-11974: Display label for the custom action From: "Jaimin Jetly" To: "Jaimin Jetly" Cc: "Di Li" , "Ambari" Date: Thu, 12 Nov 2015 19:33:35 -0000 Message-ID: <20151112193335.1680.80969@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Jaimin Jetly" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/40186/ X-Sender: "Jaimin Jetly" References: <20151112192542.1681.83795@reviews.apache.org> In-Reply-To: <20151112192542.1681.83795@reviews.apache.org> Reply-To: "Jaimin Jetly" X-ReviewRequest-Repository: ambari --===============5226903733328685963== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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: > > Remove_Sample_Data > > > PYTHON > 600 > > > > 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 > > --===============5226903733328685963==--