Project

General

Profile

« Previous | Next » 

Revision f0c0fa5b

Added by Marek Hulán over 2 years ago

Refs #33025 - fix spacing of search definitions

View differences:

app/models/report.rb
def self.inherited(child)
child.instance_eval do
scoped_search :relation => :host, :on => :name, :complete_value => true, :rename => :host
scoped_search :relation => :host, :on => :name, :complete_value => true, :rename => :host
scoped_search :relation => :host_owner,
:on => :id,
:complete_value => true,
......
:validator => ->(value) { ScopedSearch::Validators::INTEGER.call(value) },
:value_translation => ->(value) { value == 'current_user' ? User.current.id : value },
:special_values => %w[current_user]
scoped_search :relation => :organization, :on => :name, :complete_value => true, :rename => :organization
scoped_search :relation => :location, :on => :name, :complete_value => true, :rename => :location
scoped_search :relation => :messages, :on => :value, :rename => :log, :only_explicit => true
scoped_search :relation => :sources, :on => :value, :rename => :resource, :only_explicit => true
scoped_search :relation => :hostgroup, :on => :name, :complete_value => true, :rename => :hostgroup
scoped_search :relation => :hostgroup, :on => :title, :complete_value => true, :rename => :hostgroup_fullname
scoped_search :relation => :hostgroup, :on => :title, :complete_value => true, :rename => :hostgroup_title
scoped_search :relation => :organization, :on => :name, :complete_value => true, :rename => :organization
scoped_search :relation => :location, :on => :name, :complete_value => true, :rename => :location
scoped_search :relation => :messages, :on => :value, :rename => :log, :only_explicit => true
scoped_search :relation => :sources, :on => :value, :rename => :resource, :only_explicit => true
scoped_search :relation => :hostgroup, :on => :name, :complete_value => true, :rename => :hostgroup
scoped_search :relation => :hostgroup, :on => :title, :complete_value => true, :rename => :hostgroup_fullname
scoped_search :relation => :hostgroup, :on => :title, :complete_value => true, :rename => :hostgroup_title
scoped_search :on => :reported_at, :complete_value => true, :default_order => :desc, :rename => :reported, :only_explicit => true, :aliases => [:last_report]
scoped_search :on => :host_id, :complete_value => false, :only_explicit => true
scoped_search :on => :host_id, :complete_value => false, :only_explicit => true
scoped_search :on => :origin
end
super

Also available in: Unified diff