Changeset 82830
- Timestamp:
- 08/20/11 18:26:17 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-statistics/stats-server/app/views/os_statistics/index.html.erb
r82156 r82830 13 13 <% end %> 14 14 15 <br /> 16 15 17 <%# Order the charts %> 16 18 <% ordered_charts = [:macports_version, … … 22 24 :xcode_version] %> 23 25 26 <h1> Operating System Statistics </h1> 27 28 <%# Generate links %> 29 <ul> 30 <% ordered_charts.each do |chart| %> 31 <li> <%= link_to controller.chart_title(chart), :anchor => chart %> </li> 32 <% end %> 33 </ul> 34 35 <br /> 36 24 37 <% ordered_charts.each do |chart| %> 25 <% options = {:width => 600, :height => 400, :html => {:class => "graph_chart"}} %> 26 <% options[:title] = controller.chart_title chart %> 38 <% title = controller.chart_title chart %> 39 <%# Set visualization options %> 40 <% vis_options = {:width => 600, :height => 400, :html => {:class => "graph_chart"}} %> 41 <% vis_options[:title] = title %> 42 43 <%# Set table options %> 44 <% table_options = {:width => 600, :html => {:class => "graph_chart"}} %> 45 <% table_options[:title] = title %> 46 27 47 <% type = controller.chart_type chart %> 28 48 29 <% visualization chart, type, options do |visualization| %> 30 <% controller.populate_chart chart, visualization %> 49 <%# Anchor %> 50 <a name=<%= chart %>> </a> 51 <%# Title %> 52 <h2> <%= title %> </h2> 53 54 55 <% if not controller.dataset_empty? chart %> 56 <%# Draw visualization %> 57 <% visualization chart, type, vis_options do |visualization| %> 58 <% controller.populate_chart chart, visualization %> 59 <% end %> 60 61 <%# Draw table %> 62 <% table = chart.to_s + "_table" %> 63 <% visualization table, "Table", table_options do |visualization| %> 64 <% controller.populate_chart chart, visualization %> 65 <% end %> 66 <% else %> 67 No data to display 31 68 <% end %> 69 70 32 71 <% end %> 33 72
Note: See TracChangeset
for help on using the changeset viewer.

