Project

General

Profile

« Previous | Next » 

Revision ed67b8c9

Added by Dominic Cleal over 7 years ago

fixes #17574, #17364 - update scoped_search to 4.x

scoped_search's sort() now accepts a replacement for params which is
filtered in an overridden Foreman sort helper, permitting additional
parameters used in Foreman's index pages.

Replaces :in and :alias in search definitions with preferred keywords.

View differences:

app/models/operatingsystem.rb
scoped_search :on => :type, :complete_value => :true, :rename => "family"
scoped_search :on => :title, :complete_value => :true
scoped_search :in => :architectures, :on => :name, :complete_value => :true, :rename => "architecture", :only_explicit => true
scoped_search :in => :media, :on => :name, :complete_value => :true, :rename => "medium", :only_explicit => true
scoped_search :in => :provisioning_templates, :on => :name, :complete_value => :true, :rename => "template", :only_explicit => true
scoped_search :in => :os_parameters, :on => :value, :on_key=> :name, :complete_value => true, :rename => :params, :only_explicit => true
scoped_search :relation => :architectures, :on => :name, :complete_value => :true, :rename => "architecture", :only_explicit => true
scoped_search :relation => :media, :on => :name, :complete_value => :true, :rename => "medium", :only_explicit => true
scoped_search :relation => :provisioning_templates, :on => :name, :complete_value => :true, :rename => "template", :only_explicit => true
scoped_search :relation => :os_parameters, :on => :value, :on_key=> :name, :complete_value => true, :rename => :params, :only_explicit => true
FAMILIES = { 'Debian' => %r{Debian|Ubuntu}i,
'Redhat' => %r{RedHat|Centos|Fedora|Scientific|SLC|OracleLinux}i,

Also available in: Unified diff