mirror of
https://github.com/tomgi/git_stats.git
synced 2024-12-22 13:32:17 +01:00
index redirect to general
This commit is contained in:
parent
6a7d79ecca
commit
86c0dec0c0
4 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
5
templates/static/index.html
Normal file
5
templates/static/index.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV="REFRESH" content="0; url=general.html">
|
||||
</head>
|
||||
</html>
|
Loading…
Reference in a new issue