Actions
Bug #1331
closedHostgroup column's text overlaps adjacent column - 0.4
Description
The hostgroup column when viewing the list of hosts does wrap or get cut off. It goes into the next column (see attached image).
This patch fixes that problem.
diff --git a/app/views/hosts/_list.html.erb b/app/views/hosts/_list.html.erb index c65de85..ffaacbf 100644 --- a/app/views/hosts/_list.html.erb +++ b/app/views/hosts/_list.html.erb @@ -20,7 +20,7 @@ <td><%= icon(host.os, :size => "18x18", :title => host.os.to_s) + " " + host.os.to_s if host.os %></td> <td><%= h host.try(:environment) %></td> <td class="tbl-column2" rel="twipsy" data-original-title="<%= host.try(:model)%>" ><%= h host.try(:model) %></td> - <td><%= hostgroup_name host.hostgroup %></td> + <td class="tbl-column3"><%= hostgroup_name host.hostgroup %></td> <td><%= last_report_column(host) %></td> <td> <%= display_link_if_authorized 'Edit', hash_for_edit_host_path(:id => host) %> --
Additionally the host group assigned to any host isn't viewable if that group is nested. So this patch fixes that by showing the host group assigned rather than that hostgroup's nested path. This may need some changes as I don't know where else in the interface this is being used.
diff --git a/app/helpers/hosts_and_hostgroups_helper.rb b/app/helpers/hosts_and_hostgroups_helper.rb index 0da7aa2..5f933db 100644 --- a/app/helpers/hosts_and_hostgroups_helper.rb +++ b/app/helpers/hosts_and_hostgroups_helper.rb @@ -1,8 +1,7 @@ module HostsAndHostgroupsHelper def hostgroup_name group return if group.blank? - content_tag(:span, group.to_s.gsub(group.name, ""), :class => "grey") + - link_to_if_authorized(h(group.name), hash_for_edit_hostgroup_path(:id => group)) + link_to_if_authorized(h(group.name), hash_for_edit_hostgroup_path(:id => group)) end def accessible_hostgroups --
Files
Updated by Ohad Levy about 13 years ago
- Assignee changed from Ohad Levy to Amos Benari
- Target version set to 0.4.1
Updated by Amos Benari about 13 years ago
- Status changed from New to Closed
fixed in 1b56ec6cfe5b23e1a1f7d2b92c330d4032fe02c5
Actions