Class: Snapstats::PerformancesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/snapstats/performances_controller.rb

Instance Method Summary collapse

Instance Method Details

#chartObject



12
13
14
15
# File 'app/controllers/snapstats/performances_controller.rb', line 12

def chart
	data = Snapstats::EventReader::Activity.fetch_all_chart
	render json: {data: data.values, legend: data.keys}
end

#flat_chartObject



17
18
19
# File 'app/controllers/snapstats/performances_controller.rb', line 17

def flat_chart
	render json: Snapstats::EventReader::Activity.fetch_flat_chart
end

#indexObject



4
5
6
# File 'app/controllers/snapstats/performances_controller.rb', line 4

def index
	
end

#showObject



8
9
10
# File 'app/controllers/snapstats/performances_controller.rb', line 8

def show
	@controllers = Snapstats::EventReader::Performance.fetch_slowest_controllers
end