index redirect to general

This commit is contained in:
Tomasz Gieniusz 2012-10-21 16:13:56 +02:00
parent 6a7d79ecca
commit 86c0dec0c0
4 changed files with 17 additions and 4 deletions

View file

@ -6,6 +6,7 @@ module GitStats
end
def render_all
prepare_static_content
prepare_assets
layout = Tilt.new("templates/layout.haml")
@ -16,8 +17,15 @@ module GitStats
end
end
private
def all_templates
%w(index activity authors files lines)
%w(general activity authors files lines)
end
def prepare_static_content
FileUtils.cp_r(Dir['templates/static/*'], @out_path)
end
def prepare_assets

View file

@ -37,7 +37,7 @@
%tr
%th= :percentage.t
- repo.activity.by_hour_array.each do |commits|
%td= (commits * 100.0 / repo.activity.by_hour_array.sum).round(2)
%td= (commits * 100.0 / repo.activity.by_hour_array.sum).round(1)
= high_chart("charts.activity_by_hour", charts.activity_by_hour)
.tab-pane{id: 'day_of_week'}
@ -55,7 +55,7 @@
%tr
%th= :percentage.t
- repo.activity.by_wday_array.each do |commits|
%td= (commits * 100.0 / repo.activity.by_wday_array.sum).round(2)
%td= (commits * 100.0 / repo.activity.by_wday_array.sum).round(1)
= high_chart("charts.activity_by_wday", charts.activity_by_wday)
@ -88,7 +88,7 @@
%tr
%th= :percentage.t
- repo.activity.by_month_array.each do |commits|
%td= (commits * 100.0 / repo.activity.by_month_array.sum).round(2)
%td= (commits * 100.0 / repo.activity.by_month_array.sum).round(1)
= high_chart("charts.activity_by_month", charts.activity_by_month)

View file

@ -0,0 +1,5 @@
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=general.html">
</head>
</html>