Sha256: f2d8d9f5e2c7631b5f9df554f7723d5a9d346232ce46d72e12e62a6a4e8d81d2

Contents?: true

Size: 625 Bytes

Versions: 34

Compression:

Stored size: 625 Bytes

Contents

module Rack::Insight
  class PanelsHeader < PanelApp
    def initialize(insight_app)
      @insight_app = insight_app
      @request_table = Database::RequestTable.new
    end

    def dispatch
      return not_found("not get") unless @request.get?
      return not_found("id nil") if params['request_id'].nil?
      request = @request_table.select("*", "id = #{params['request_id']}").first
      return not_found("id not found") if request.nil?
      render_template("headers_fragment",
                      :request_id => params['request_id'].to_i,
                      :panels => @insight_app.panels)
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
rack-insight-0.5.13 lib/rack/insight/panels-header.rb
rack-insight-0.5.12 lib/rack/insight/panels-header.rb
rack-insight-0.5.11 lib/rack/insight/panels-header.rb
rack-insight-0.5.10 lib/rack/insight/panels-header.rb
rack-insight-0.5.9 lib/rack/insight/panels-header.rb
rack-insight-0.5.8 lib/rack/insight/panels-header.rb
rack-insight-0.5.7 lib/rack/insight/panels-header.rb
rack-insight-0.5.6 lib/rack/insight/panels-header.rb
rack-insight-0.5.5 lib/rack/insight/panels-header.rb
rack-insight-0.5.4 lib/rack/insight/panels-header.rb
rack-insight-0.5.3 lib/rack/insight/panels-header.rb
rack-insight-0.5.2 lib/rack/insight/panels-header.rb
rack-insight-0.5.1 lib/rack/insight/panels-header.rb
rack-insight-0.5.0 lib/rack/insight/panels-header.rb