Class: Setting::Monitoring

Inherits:
Setting
  • Object
show all
Defined in:
app/models/setting/monitoring.rb

Class Method Summary collapse

Class Method Details

.load_defaultsObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/models/setting/monitoring.rb', line 3

def self.load_defaults
  # Check the table exists
  return unless super

  Setting.transaction do
    [
      set('monitoring_affect_global_status',
          _("Monitoring status will affect a host's global status when enabled"),
          true, N_('Monitoring status should affect global status'))
    ].compact.each { |s| create! s.update(:category => 'Setting::Monitoring') }
  end
end