Project

General

Profile

« Previous | Next » 

Revision 0bb7ac8f

Added by Brian Gupta about 12 years ago

  • ID 0bb7ac8f3f071543bcb52c2c214708d8ebfb21a8

Changes to dashboard statistics. Fixes #1617

View differences:

app/models/host.rb
scope :alerts_disabled, {:conditions => ["enabled = ?", false] }
scope :alerts_enabled, {:conditions => ["enabled = ?", true] }
scope :my_hosts, lambda {
user = User.current
owner_conditions = sanitize_sql_for_conditions(["((hosts.owner_id in (?) AND hosts.owner_type = 'Usergroup') OR (hosts.owner_id = ? AND hosts.owner_type = 'User'))", user.my_usergroups.map(&:id), user.id])

Also available in: Unified diff