Class: SolidObserver::DashboardController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SolidObserver::DashboardController
- Defined in:
- app/controllers/solid_observer/dashboard_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
8 9 10 11 |
# File 'app/controllers/solid_observer/dashboard_controller.rb', line 8 def index assign_range_and_stats load_persistence_data if persistence_mode? end |
#live_poll ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/controllers/solid_observer/dashboard_controller.rb', line 13 def live_poll send_file( SolidObserver::Engine.root.join("app/assets/javascripts/solid_observer/live_poll.js"), type: "application/javascript; charset=utf-8", disposition: "inline" ) end |
#poll_data ⇒ Object
21 22 23 24 25 26 |
# File 'app/controllers/solid_observer/dashboard_controller.rb', line 21 def poll_data range = QueueStats.parse_range(request_range_param, fallback: QueueStats::POLL_DEFAULT_RANGE) window = QueueStats.range_duration(range, fallback: QueueStats::POLL_DEFAULT_RANGE) append_chart_buffer render json: tick_request? ? tick_payload : full_payload(range: range, window: window) end |