File tree Expand file tree Collapse file tree 4 files changed +20
-8
lines changed
Expand file tree Collapse file tree 4 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 66import requests
77import web
88
9- from . import db
10-
119from infogami import config
1210from openlibrary .core import cache
1311
12+ from . import db
13+
1414
1515class Stats :
1616 def __init__ (self , docs , key , total_key ):
@@ -205,7 +205,7 @@ def get_cached_unique_logins_since(since_days=30):
205205 get_unique_logins_since ,
206206 key_prefix = key_prefix ,
207207 timeout = twelve_hours ,
208- prethread = caching_prethread ()
208+ prethread = caching_prethread (),
209209 )
210210 return mc (since_days = since_days )
211211
Original file line number Diff line number Diff line change @@ -3478,6 +3478,12 @@ msgstr ""
34783478msgid "Items"
34793479msgstr ""
34803480
3481+ #: admin/index.html
3482+ msgid ""
3483+ "<span class=\" login-counts\" >0</span> patrons have logged in at least "
3484+ "once over the past 30 days."
3485+ msgstr ""
3486+
34813487#: admin/index.html
34823488msgid "Stats"
34833489msgstr ""
@@ -3614,6 +3620,14 @@ msgstr ""
36143620msgid "Borrows, last 2 years graph"
36153621msgstr ""
36163622
3623+ #: admin/index.html
3624+ msgid "Unique Logins"
3625+ msgstr ""
3626+
3627+ #: admin/index.html
3628+ msgid "Gathering login statistics..."
3629+ msgstr ""
3630+
36173631#: admin/loans_table.html
36183632msgid "BookReader"
36193633msgstr ""
Original file line number Diff line number Diff line change @@ -1070,8 +1070,6 @@ class monthly_logins(delegate.page):
10701070
10711071 def GET (self ):
10721072 return delegate .RawText (
1073- json .dumps ({
1074- "loginCount" : get_cached_unique_logins_since ()
1075- }),
1076- content_type = "application/json"
1073+ json .dumps ({"loginCount" : get_cached_unique_logins_since ()}),
1074+ content_type = "application/json" ,
10771075 )
Original file line number Diff line number Diff line change @@ -31,5 +31,5 @@ export async function initUniqueLoginCounts(containerElem) {
3131 * @see `monthly_logins` class in /openlibrary/plugins/openlibrary/api.py
3232 */
3333async function fetchCounts ( ) {
34- return fetch ( " /api/monthly_logins.json" )
34+ return fetch ( ' /api/monthly_logins.json' )
3535}
You can’t perform that action at this time.
0 commit comments