Commit a6c6e822 authored by Hermann Krumrey's avatar Hermann Krumrey
Browse files

Merge branch 'develop' into 'master'

Develop

See merge request namibsun/python/bundesliga-tippspiel!14
parents 43c5864a 2f274086
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
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:
+6 −0
Original line number Diff line number Diff line
@@ -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),
+1 −1
Original line number Diff line number Diff line
@@ -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',
+1 −1
Original line number Diff line number Diff line
0.17.1
 No newline at end of file
0.17.3
 No newline at end of file