Class: Crm::Reports::WebSitePerformanceController

Inherits:
CrmController
  • Object
show all
Defined in:
app/controllers/crm/reports/web_site_performance_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/crm/reports/web_site_performance_controller.rb', line 4

def show
  params[:command] ||= {}
  params[:command][:branch] ||= []
  params[:command][:breakdown] ||= [1]
  @report_command = ::Report::WebSitePerformance::WebSitePerformanceCommand.new(params[:command])
  @result = @report_command.execute
  return render partial: 'mini_view', layout: false if request.headers['Turbo-Frame'].present?

  respond_to do |format|
    format.html do
      render partial: 'mini_view', layout: false if request.xhr?
    end
  end
end