X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/34c44145a77003ac4fcabd0b865f039bc24f97f4..171c0354e74b4fdd73e25ea05f5b2d23c0d1642f:/vendor/plugins/sitealizer/lib/app/views/sitealizer/hourly_stats.rhtml diff --git a/vendor/plugins/sitealizer/lib/app/views/sitealizer/hourly_stats.rhtml b/vendor/plugins/sitealizer/lib/app/views/sitealizer/hourly_stats.rhtml new file mode 100644 index 0000000..436c886 --- /dev/null +++ b/vendor/plugins/sitealizer/lib/app/views/sitealizer/hourly_stats.rhtml @@ -0,0 +1,39 @@ +
+ + + + +
+
+
Hourly Statistics - <%=params[:month]%>-<%=params[:year]%>
+ +<% hits_max_total = @hourly_hits.inject(0) {|m,a| a[2].to_i > m ? a[2].to_i : m } %> +

+ + + + + + + + +<% +@hourly_hits.each do |hourly_hits| +width = 0 +if hits_max_total > 0 + width = ((hourly_hits[2].to_f/hits_max_total)*200).round + width = 1 if width < 1 +end +%> + + + + + + + +<% end %> +
HourHitsPercentage
<%= hourly_hits[0] %><%= hourly_hits[2] %><%= sprintf("%000.2f",(hourly_hits[2].to_f/@total_hits)*100) %>%<%=image_tag 'sitealizer/bar.gif', :width => width, :height => 3%>
+
+
+
\ No newline at end of file