Revision 9d56081f
Added by Timo Goebel almost 8 years ago
app/models/concerns/hostext/search.rb | ||
---|---|---|
scoped_search :in => :config_groups, :on => :name, :complete_value => true, :rename => :config_group, :only_explicit => true, :operators => ['= ', '~ '], :ext_method => :search_by_config_group
|
||
|
||
if SETTINGS[:unattended]
|
||
scoped_search :in => :subnet, :on => :network, :complete_value => true, :rename => :subnet
|
||
scoped_search :in => :subnet, :on => :name, :complete_value => true, :rename => 'subnet.name'
|
||
scoped_search :in => :subnet, :on => :network, :complete_value => false, :rename => :subnet
|
||
scoped_search :in => :subnet, :on => :name, :complete_value => false, :rename => 'subnet.name'
|
||
scoped_search :in => :subnet6, :on => :network, :complete_value => false, :rename => :subnet6
|
||
scoped_search :in => :subnet6, :on => :name, :complete_value => false, :rename => 'subnet6.name'
|
||
scoped_search :on => :uuid, :complete_value => true
|
||
scoped_search :on => :build, :complete_value => {:true => true, :false => false}
|
||
scoped_search :on => :installed_at, :complete_value => true, :only_explicit => true
|
||
... | ... | |
when 'HostParameter'
|
||
conditions << "hosts.id = #{param.reference_id}"
|
||
when 'SubnetParameter'
|
||
conditions << "nics.subnet_id = #{param.reference_id}"
|
||
conditions << "nics.subnet_id = #{param.reference_id} OR nics.subnet6_id = #{param.reference_id}"
|
||
end
|
||
end
|
||
conditions.empty? ? [] : "( #{conditions.join(' OR ')} )"
|
Also available in: Unified diff
fixes #14664 - support IPv6 in Nic, Hosts and Hostgroups models