From 48ea2efc8d736058cd87cfe601623f6cd213ebea Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Wed, 25 Sep 2013 23:25:17 +0200 Subject: [PATCH 1/2] Fix the mapreduce of the download statistics --- mapreduce.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mapreduce.go b/mapreduce.go index cf39e1d..7603fb9 100644 --- a/mapreduce.go +++ b/mapreduce.go @@ -237,7 +237,7 @@ func (m *MR) GetHourDownloads(start time.Time, statsColl *mgo.Collection) ([]Vis this.date.getUTCMonth(), this.date.getUTCDate(), this.date.getUTCHours()); - emit({date: date}, 1); + emit(date, 1); } }` mr.Reduce = `function(date, vals) { @@ -265,7 +265,7 @@ func (m *MR) GetDayDowloads(start time.Time, statsColl *mgo.Collection) ([]Visit var date = Date.UTC(this.date.getUTCFullYear(), this.date.getUTCMonth(), this.date.getUTCDate()); - emit({date: date}, 1); + emit(date, 1); } }` mr.Reduce = `function(date, vals) { @@ -292,7 +292,7 @@ func (m *MR) GetMonthDowloads(start time.Time, statsColl *mgo.Collection) ([]Vis if (this.section == "download") { var date = Date.UTC(this.date.getUTCFullYear(), this.date.getUTCMonth()); - emit({date: date}, 1); + emit(date, 1); } }` mr.Reduce = `function(date, vals) { From aebea27517ad4e0fec1b7d1ba38559441d171643 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Sun, 17 Nov 2013 19:11:36 +0100 Subject: [PATCH 2/2] Fixing index style --- templates/index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/index.html b/templates/index.html index 6dfbab2..6a41dd6 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,6 +16,7 @@ (more) + @@ -35,10 +36,8 @@
-

Most visited books:

-
-

Most downloaded books:

-