Sha256: 5a112e970cdf43164c8a9593a2d94150e242a0294ac933126fa6f258bf8a2c46

Contents?: true

Size: 493 Bytes

Versions: 2

Compression:

Stored size: 493 Bytes

Contents

require_dependency "my_nagios/application_controller"

module MyNagios
  class WelcomeController < ApplicationController

    before_filter :find_criticals, only: [:index, :autorefresh]

    def index
      @group = Group.all.includes(:checks)
    end

    def autorefresh
      respond_to do |format|
        format.js { render layout: false }
      end
    end

    private

    def find_criticals
      @criticals = Check.enabled.where(status: Check.statuses[:critical])
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
my_nagios-0.0.4 app/controllers/my_nagios/welcome_controller.rb
my_nagios-0.0.3 app/controllers/my_nagios/welcome_controller.rb