+++ This bug was initially created as a clone of Bug #1255182 +++ Description of problem: Puppet class names in the web UI do not resize to the width of the cell (So if you have a <module>::<var> class name that approaches 32 chars this may not be fully visible). Version-Release number of selected component (if applicable): 6.1.5 How reproducible: Config -> Puppet classes Steps to Reproduce: This is generated by /usr/share/foreman/app/views/puppetclasses/index.html.erb <% for puppetclass in @puppetclasses %> <tr> <td><%=link_to_if_authorized trunc(puppetclass.name), hash_for_edit_puppetclass_path(:id => puppetclass).merge(:auth_object => puppetclass, :authorizer => authorizer) %></td> <td> And the trunc method (from : /usr/share/foreman/app/helpers/layout_helper.rb) says this: def trunc(text, length = 32) text = text.to_s options = text.size > length ? { :'data-original-title' => text, :rel => 'twipsy' } : {} content_tag(:span, truncate(text, :length => length), options).html_safe end Actual results: Class name text is trucated to 32 chars Expected results: Class names should be fully visible Additional info:
Since i missed this earlier... 1255182 is about the capsule name, this is about the puppet class.
Created redmine issue http://projects.theforeman.org/issues/13384 from this bug
Upstream bug component is Provisioning
Upstream bug component is WebUI
Based on the comment in the upstream redmine, this has already been addressed. Moving the bug to POST, since it should be included with the next rebase.
Verified in satellite-6.2.0-6.2.beta.el7sat.noarch I am able to hover over the class to see the full puppet class name - I tested a class with 81 characters and the screenshot is attached.
Created attachment 1144879 [details] puppet class with 81 characters name
Created attachment 1144880 [details] puppet class page
Looking at the capsule bug, https://bugzilla.redhat.com/show_bug.cgi?id=1255182, I think the expectation is to wrap the name and not truncate it.
Hi Ivan, Do you have any thoughts on this one? My assumption is that using ellipsis is the expected behavior for fields that may be long strings; however, it appears that the solution for this bug may be inconsistent with bug 1255182 (i.e. ellipsis vs wrapping). In addition, looking at screenshot that Suresh attached for 'New Host Group' showing the 'Available Classes', it appears that we are not leveraging the space available before applying the ellipsis.
This bug is about the puppet classes index page, which I understand from https://bugzilla.redhat.com/show_bug.cgi?id=1293486#c11 is handled properly now, and the case is with the puppet classes selector in host details. Since it's not part of the original bugzilla, that was already in verified state, I would suggest creating a separate bz redscribing this problem
@Ivan, Let me rephrase my concerns: 1. Ignore comment 10 2. In comment 11, as per the screenshot, it is clear that we are not wrapping the long names - instead we are showing the full name in mouse hover. 3. Now this is contradicting https://bugzilla.redhat.com/show_bug.cgi?id=1255182#c8 which says that the longer names are wrapped and not ellipsized.
The difference between the capsule names and class names is the class names contain only chars and ::, so there is not natural place for wrapping, unlike with capsule names, so we would need to allow to wrap in between of class names. Is this desired behavior? My understanding of the initial bug was we were always truncating to 32 chars (regardless of free space on the page). Honestly the ellipsis looks better to me than the artificial wrapping (see attachment when I tried that out)
Created attachment 1145862 [details] How would the class names look when wrapping instead of ellipsis
As per Comment 16, if there is not a way to wrap puppet class names, I am okay with leaving it as ellipsis. Verified in satellite-6.2.0-6.2.beta.el7sat.noarch
Script cleanup. This was fixed by http://projects.theforeman.org/issues/13384
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1500