Changeset 82828
- Timestamp:
- 08/20/11 18:23:55 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsoc11-statistics/stats-server/app/views/ports/show.html.erb
r82159 r82828 17 17 :variant_count] %> 18 18 19 <h1> <%= @port.name %> </h1> 20 21 <br /> 22 19 23 <div id="content"> 20 <p>21 <strong>Name:</strong> <%= @port.name %>22 </p>23 24 24 <p> 25 25 <strong>Current Version:</strong> <%= @port.version %> … … 49 49 <% end %> 50 50 51 </div> 52 53 <br /> 54 55 <h2> Stats </h2> 56 57 <%# Generate links %> 58 <ul> 59 <% ordered_charts.each do |chart| %> 60 <li> <%= link_to controller.chart_title(chart), :anchor => chart %> </li> 61 <% end %> 62 </ul> 63 64 <br /> 65 51 66 <%# Draw charts %> 52 67 <% ordered_charts.each do |chart| %> 53 <% options = {:width => 600, :height => 400, :html => {:class => "graph_chart"}} %> 54 <% options[:title] = controller.chart_title chart %> 68 <% title = controller.chart_title chart %> 69 <%# Set visualization options %> 70 <% vis_options = {:width => 600, :height => 400, :html => {:class => "graph_chart"}} %> 71 <% vis_options[:title] = title %> 72 73 <%# Set table options %> 74 <% table_options = {:width => 600, :html => {:class => "graph_chart"}} %> 75 <% table_options[:title] = title %> 76 55 77 <% type = controller.chart_type chart %> 56 78 57 <% visualization chart, type, options do |visualization| %> 58 <% controller.populate_chart chart, visualization %> 59 <% end %> 79 <%# Anchor %> 80 <a name=<%= chart %>> </a> 81 <%# Title %> 82 <h2> <%= title %> </h2> 83 84 85 <% if not controller.dataset_empty? chart %> 86 <%# Draw visualization %> 87 <% visualization chart, type, vis_options do |visualization| %> 88 <% controller.populate_chart chart, visualization %> 89 <% end %> 90 91 <%# Draw table %> 92 <% table = chart.to_s + "_table" %> 93 <% visualization table, "Table", table_options do |visualization| %> 94 <% controller.populate_chart chart, visualization %> 95 <% end %> 96 97 <% else %> 98 No data to display 99 <% end %> 60 100 <% end %> 61 101
Note: See TracChangeset
for help on using the changeset viewer.

