Revision 7edfd32f
Added by Dominic Cleal about 11 years ago
- ID 7edfd32f9f2df2aac1206ca19a6b609d1561e34d
app/helpers/hosts_and_hostgroups_helper.rb | ||
---|---|---|
return if hostgroup.blank?
|
||
options = (hostgroup.label.to_s.size > max_length) ? {:'data-original-title'=> hostgroup.label, :rel=>'twipsy'} : {}
|
||
nesting = hostgroup.label.to_s.gsub(/[^\/]+\/?$/, "")
|
||
nesting = truncate(nesting, :length => max_length - hostgroup.label.to_s.size) if nesting.to_s.size > 0
|
||
nesting = truncate(nesting, :length => max_length - hostgroup.name.to_s.size) if nesting.to_s.size > 0
|
||
name = truncate(hostgroup.name, :length => max_length - nesting.to_s.size)
|
||
link_to_if_authorized(
|
||
content_tag(:span,
|
Also available in: Unified diff
fixes #2453 - fix aggressive truncation of hostgroups < 26 chars
(cherry picked from commit 3cda1a7360cb4f27b7dff8db6717cdc91e1ca904)