Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 359 Bytes
class StatusController < ApplicationController
def show
@pings = Ping.all.sort_by { |x| x.service }
crit = @pings.any? { |x| x.down? and x.critical? }
if @pings.empty?
@status = "unknown"
elsif crit
@status = "down"
else
@status = @pings.any? { |x| x.down? } ? "partial" : "up"
end
end
def system
end
end
Jump to Line
Something went wrong with that request. Please try again.