Class: Dbwatcher::TablesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Dbwatcher::TablesController
- Defined in:
- app/controllers/dbwatcher/tables_controller.rb
Instance Method Summary collapse
Instance Method Details
#changes ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/dbwatcher/tables_controller.rb', line 20 def changes @table_name = params[:id] @changes = Storage.tables.changes_for(@table_name).all @sessions = extract_session_ids(@changes) @records = group_changes_by_record(@changes) end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/dbwatcher/tables_controller.rb', line 5 def index @tables = Dbwatcher::Services::TableStatisticsCollector.call end |
#show ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/dbwatcher/tables_controller.rb', line 9 def show @table_name = params[:id] @changes = Storage.tables.changes_for(@table_name).all @sessions = @changes.map { |c| c[:session_id] }.uniq respond_to do |format| format.html format.json { render json: @changes } end end |