Class: Rack::Insight::SQLPanel::PanelApp
- Defined in:
- lib/rack/insight/panels/sql_panel/panel_app.rb
Instance Attribute Summary
Attributes inherited from PanelApp
Instance Method Summary collapse
Methods inherited from PanelApp
#call, #not_found, #params, #render_template, #validate_params
Methods included from Render
#compile, #compile!, #compiled_source, #method_name, #method_name_without_locals, #render_template, #signed_params
Methods included from Logging
Instance Method Details
#dispatch ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/rack/insight/panels/sql_panel/panel_app.rb', line 8 def dispatch case request.path_info when "/explain" then explain_sql when "/profile" then profile_sql when "/execute" then execute_sql else not_found end end |
#execute_sql ⇒ Object
29 30 31 32 33 |
# File 'lib/rack/insight/panels/sql_panel/panel_app.rb', line 29 def execute_sql validate_params query = QueryResult.new(params["query"], params["time"].to_f) render_template "panels/execute_sql", :query => query end |
#explain_sql ⇒ Object
17 18 19 20 21 |
# File 'lib/rack/insight/panels/sql_panel/panel_app.rb', line 17 def explain_sql validate_params query = ExplainResult.new(params["query"], params["time"].to_f) render_template "panels/explain_sql", :query => query end |
#profile_sql ⇒ Object
23 24 25 26 27 |
# File 'lib/rack/insight/panels/sql_panel/panel_app.rb', line 23 def profile_sql validate_params query = ProfileResult.new(params["query"], params["time"].to_f) render_template "panels/profile_sql", :query => query end |