You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Keta Patel (JIRA)" <ji...@apache.org> on 2015/12/15 02:59:46 UTC

[jira] [Commented] (AMBARI-11670) Width of services menu container is fixed and causes part of longer service names to be rendered outside the frame

    [ https://issues.apache.org/jira/browse/AMBARI-11670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15057170#comment-15057170 ] 

Keta Patel commented on AMBARI-11670:
-------------------------------------

Cause of Issue:-
This problem arises because there is no provision for wrapping the name on a white space. As a result the name with the refresh icon following it appear in one line outside the frame. 
Please find the attachment named "long_service_name.png" to depict this issue.

Explanation of the fix:
[1]
Since the service names do not have a limit on the maximum characters it can use, the width of the services menu container can not be adjusted to accommodate the longest service name. So in order to solve this issue by keeping the menu container's width fixed, we have fixed the positions of the Health icon, Service name, Refresh icon and Alert box by surrounding them in div blocks of fixed width. Also, the Service name now has a CSS style to allow wrapping on white-space and breaking on words in case of long words.

[2]
While making the change to the file menu_item.hbs for the menu container, we found that there were already some changes made for an earlier JIRA (AMBARI-12789). The issue there was associated with a large Alert count overlapping the Refresh icon in the menu container. This issue however still seemed to be present after the fix.
Please refer to attachment named "big_alert_count.png" to depict this issue as we saw in the Ambari Trunk. I had manually passed alert count of 100000 in menu_item.hbs file to reproduce this test scenario of having a big alert count.
To solve this issue of how to show the big alert count reasonably in the menu container, we have come up with the fix of showing "99+" for any alert count greater than 99. The exact value of the alert can be seen in the Summary page of the Service. We came up with this fix considering that the average case of alert counts usually involves 2 digits or less. Any count greater than that is not very likely to occur and even if for some reason there are a lot of alerts, then showing the exact count in the fixed width menu container comes only secondary to showing that the Service has alerts.

The fix with this Alert count can be seen in the attachment named "service_name_and_alerts_with_fix.png". This image also shows the new rendering of the long Service name with the Refresh icon in their fixed div blocks.


> Width of services menu container is fixed and causes part of longer service names to be rendered outside the frame
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-11670
>                 URL: https://issues.apache.org/jira/browse/AMBARI-11670
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-web
>    Affects Versions: 2.1.0
>            Reporter: Sangeeta Ravindran
>            Assignee: Keta Patel
>            Priority: Minor
>         Attachments: AMBARI-11670.patch, big_alert_count.png, long_service_name.png, service_name_and_alerts_with_fix.png
>
>
> If a service has a really long name (19 characters or more), part of the service name is rendered outside the frame. Any action icons for e.g. refresh also appear outside the frame.
> The frame width should change dynamically to accommodate a longer service name or the service name should wrap to the next line.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)