Commit a6c6e822 authored by Hermann Krumrey's avatar Hermann Krumrey

Merge branch 'develop' into 'master'

Develop

See merge request namibsun/python/bundesliga-tippspiel!14
parents 43c5864a 2f274086
V 0.17.3:
- Now logs how long a leaderboard query takes
V 0.17.2:
- Made rankings load asynchronously
V 0.17.1:
- Fixed match updating
V 0.17.0:
......
......@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with bundesliga-tippspiel. If not, see <http://www.gnu.org/licenses/>.
LICENSE"""
import time
from flask import render_template, abort
from flask_login import login_required
from bundesliga_tippspiel import app
......@@ -38,9 +39,14 @@ def leaderboard():
Displays a leaderboard.
:return: The Response
"""
start = time.time()
app.logger.debug("Start generating leaderboard data")
leaderboard_data = \
LeaderboardAction.from_site_request().execute()["leaderboard"]
current_matchday, leaderboard_history = generate_leaderboard_data()
delta = "%.2f" % (time.time() - start)
app.logger.debug("Generated leaderboard data in {}s".format(delta))
return render_template(
"info/leaderboard.html",
leaderboard=enumerate(leaderboard_data),
......
......@@ -27,7 +27,7 @@ along with bundesliga-tippspiel. If not, see <http://www.gnu.org/licenses/>.
<canvas id="rankings-chart" width="400" height="200"></canvas>
<!--suppress JSUnusedGlobalSymbols, JSUnusedLocalSymbols, JSDuplicatedDeclaration -->
<script>
<script async>
let ctx = document.getElementById("rankings-chart").getContext("2d");
let chart = new Chart(ctx, {
type: 'line',
......
0.17.1
\ No newline at end of file
0.17.3
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment