Project

General

Profile

« Previous | Next » 

Revision 5d264a2d

Added by Ohad Levy over 12 years ago

  • ID 5d264a2db100fd1ba7c505697076c4072698b094

refactor - various facts cleanups

View differences:

app/models/fact_value.rb
scoped_search :in => :host, :on => :name, :rename => :host, :default_order => true
named_scope :no_timestamp_facts, :include => [:fact_name],
:conditions => ["fact_names.name <> ?","--- !ruby/sym _timestamp"]
:conditions => ["fact_names.name <> ?",:_timestamp]
named_scope :timestamp_facts, :joins => [:fact_name],
:conditions => ["fact_names.name = ?","--- !ruby/sym _timestamp"]
:conditions => ["fact_names.name = ?",:_timestamp]
named_scope :distinct, { :select => 'DISTINCT "fact_values.value"' }
named_scope :required_fields, { :include => :host }
default_scope :order => 'LOWER(fact_values.value)'
# Todo: find a way to filter which values are logged,
# this generates too much useless data

Also available in: Unified diff