app/controllers/report_controller.rb
# Graph/Hybrid/Tabular toggle button was hit (ajax version)
Graph/Hybrid/Tabular toggle button was hit (ajax version)
Graph / Hybrid / Tabular toggle button was hit ( ajax version )
def switch_ght
    rr      = MiqReportResult.find(@sb[:pages][:rr_id])
    @html   = report_build_html_table(rr.report_results,
                                      rr.html_rows(:page     => @sb[:pages][:current],
                                                   :per_page => @sb[:pages][:perpage]).join)
    @report = rr.report_results                 
    @zgraph = nil
    @html   = nil
    if ["tabular", "hybrid"].include?(params[:type])
      @html = report_build_html_table(@report,
                                      rr.html_rows(:page     => @sb[:pages][:current],
                                                   :per_page => @sb[:pages][:perpage]).join)
    end
    if ["graph", "hybrid"].include?(params[:type])
      @zgraph = true      
    end
    @ght_type = params[:type]
    @title = @report.title
  end
def switch_ght rr = MiqReportResult . find ( @sb [ :pages ] [ :rr_id ] ) @html = report_build_html_table ( rr . report_results , rr . html_rows ( :page => @sb [ :pages ] [ :current ] , :per_page => @sb [ :pages ] [ :perpage ] ) . join ) @report = rr . report_results @zgraph = nil @html = nil if [ "tabular" , "hybrid" ] . include? ( params [ :type ] ) @html = report_build_html_table ( @report , rr . html_rows ( :page => @sb [ :pages ] [ :current ] , :per_page => @sb [ :pages ] [ :perpage ] ) . join ) end if [ "graph" , "hybrid" ] . include? ( params [ :type ] ) @zgraph = true end @ght_type = params [ :type ] @title = @report . title end
Graph/Hybrid/Tabular toggle button was hit (ajax version)
Graph / Hybrid / Tabular toggle button was hit ( ajax version )
# Grab the blobbed report, including table # Show the zgraph in the report