Class: Insight::RequestVariablesPanel
- Inherits:
-
Panel
- Object
- Panel
- Insight::RequestVariablesPanel
- Defined in:
- lib/insight/panels/request_variables_panel.rb
Instance Attribute Summary
Attributes inherited from Panel
Instance Method Summary (collapse)
- - (Object) after(env, status, headers, body)
- - (Object) content_for_request(number)
- - (Object) heading
-
- (RequestVariablesPanel) initialize(app)
constructor
A new instance of RequestVariablesPanel.
- - (Object) name
Methods inherited from Panel
#before, #call, current_panel_file, excluded, file_index, from_file, #has_content?, #heading_for_request, inherited, #panel_app, panel_exclusion, panel_mappings, #render
Methods included from Instrumentation::Client
#after_detect, #before_detect, #probe, #request_finish, #request_start
Methods included from Logging
Methods included from Database::RequestDataClient
#key_sql_template, #retrieve, #store, #table_length, #table_setup
Methods included from Render
#compile, #compile!, #compiled_source, #method_name, #method_name_without_locals, #render_template, #signed_params
Constructor Details
- (RequestVariablesPanel) initialize(app)
A new instance of RequestVariablesPanel
3 4 5 6 7 |
# File 'lib/insight/panels/request_variables_panel.rb', line 3 def initialize(app) super table_setup("request_variables") end |
Instance Method Details
- (Object) after(env, status, headers, body)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/insight/panels/request_variables_panel.rb', line 13 def after(env,status,headers,body) sections = {} sections["GET"] = sort(@request.GET) if @request.GET.any? sections["POST"] = sort(@request.POST) if @request.POST.any? sections["Session"] = sort(@request.env["rack.session"]) if @request.env["rack.session"] && @request.env["rack.session"].any? sections["Cookies"] = sort(@request.env["rack.request.cookie_hash"]) if @request.env["rack.request.cookie_hash"] && @request.env["rack.request.cookie_hash"].any? server, rack = split_and_filter_env(@env) sections["SERVER VARIABLES"] = sort(server) sections["Rack ENV"] = sort(rack) # require 'pp' # ::File.open("sections.dump", "w") do |file| # PP.pp(sections, file) # end store(env, sections) end |
- (Object) content_for_request(number)
34 35 36 37 38 |
# File 'lib/insight/panels/request_variables_panel.rb', line 34 def content_for_request(number) sections = retrieve(number).first render_template "panels/request_variables", :sections => sections end |
- (Object) heading
30 31 32 |
# File 'lib/insight/panels/request_variables_panel.rb', line 30 def heading "Rack Env" end |
- (Object) name
9 10 11 |
# File 'lib/insight/panels/request_variables_panel.rb', line 9 def name "request_variables" end |