Skip to content

Commit

Permalink
Merge pull request #710 from PanSpagetka/change-graph-options-calls
Browse files Browse the repository at this point in the history
Change graph options calls
  • Loading branch information
martinpovolny authored Mar 16, 2017
2 parents 46d486c + d651402 commit c20f2c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def render_chart
response.headers["Cache-Control"] = "cache, must-revalidate"
response.headers["Pragma"] = "public"
end
rpt.to_chart(settings(:display, :reporttheme), true, MiqReport.graph_options(params[:width], params[:height]))
rpt.to_chart(settings(:display, :reporttheme), true, MiqReport.graph_options)
render Charting.render_format => rpt.chart
end

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/application_controller/performance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ def perf_gen_chart(report, options)
report.graph[:max_col_size] = options[:max_value]
# FIXME: rename xml, xml2 to something like 'chart_data'
report.to_chart(settings(:display, :reporttheme), false,
MiqReport.graph_options(options[:width], options[:height], options))
MiqReport.graph_options(options))
chart_xml = {
:xml => report.chart, # Save the graph xml
:main_col => options[:columns].first # And the main (first) column of the chart
Expand All @@ -1291,7 +1291,7 @@ def perf_gen_chart(report, options)
report.graph[:type] = options[:chart2][:type]
report.graph[:columns] = options[:chart2][:columns]
report.to_chart(settings(:display, :reporttheme), false,
MiqReport.graph_options(options[:width], options[:height], options.merge(:composite => true)))
MiqReport.graph_options(options.merge(:composite => true)))
chart_xml[:xml2] = report.chart
end
chart_xml
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/report_controller/reports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def show_preview
end
unless rpt.graph.nil? || rpt.graph[:type].blank? # If graph present
# FIXME: UNTESTED!!!
rpt.to_chart(settings(:display, :reporttheme), false, MiqReport.graph_options(350, 250)) # Generate the chart
rpt.to_chart(settings(:display, :reporttheme), false, MiqReport.graph_options) # Generate the chart
@edit[:zgraph_xml] = rpt.chart # Save chart data
else
@edit[:zgraph_xml] = nil
Expand Down

0 comments on commit c20f2c8

Please sign in to comment.