Improved layout

This commit is contained in:
guimoz 2017-01-30 11:12:24 +01:00
parent c76c7dbf9a
commit 76a38d4aa1
7 changed files with 19 additions and 20 deletions

View file

@ -321,8 +321,7 @@ def statistiques():
else: else:
n_tranchés += 1 n_tranchés += 1
stats = (tranchés,n_tranchés) return (tranchés,n_tranchés)
return stats
@app.route('/banned_ip') @app.route('/banned_ip')
@ -364,20 +363,20 @@ def home():
reverse=True) reverse=True)
bans_hist = [] bans_hist = []
for banned in bans: for banned_user in bans:
date = strftime('%Hh%M (%A)', localtime(banned['time'])) date = strftime('%Hh%M (%A)', localtime(banned_user['time']))
source = get_player(banned['player_id']) source = get_player(banned_user['player_id'])
target = get_player(banned['target_id']) target = get_player(banned_user['target_id'])
if target['id'] == player['id']: if target['id'] == player['id']:
if banned['success']: if banned_user['success']:
entry = ('ban', u'%s : %s %s a réussi à t\'avoir.' \ entry = ('ban', u'%s : %s %s a réussi à t\'avoir.' \
% (date, source['firstname'], source['name'])) % (date, source['firstname'], source['name']))
else: else:
entry = ('warn', u'%s : %s %s a essayé de te trancher, en vain.' \ entry = ('warn', u'%s : %s %s a essayé de te trancher, en vain.' \
% (date, source['firstname'], source['name'])) % (date, source['firstname'], source['name']))
else: else:
if banned['success']: if banned_user['success']:
entry = ('ok', u'%s : Tu as tranché %s %s avec succès.' \ entry = ('ok', u'%s : Tu as tranché %s %s avec succès.' \
% (date, target['firstname'], target['name'])) % (date, target['firstname'], target['name']))
else: else:
@ -403,20 +402,20 @@ def play():
reverse=True) reverse=True)
bans_hist = [] bans_hist = []
for banned in bans: for banned_user in bans:
date = strftime('%Hh%M (%A)', localtime(banned['time'])) date = strftime('%Hh%M (%A)', localtime(banned_user['time']))
source = get_player(banned['player_id']) source = get_player(banned_user['player_id'])
target = get_player(banned['target_id']) target = get_player(banned_user['target_id'])
if target['id'] == player['id']: if target['id'] == player['id']:
if banned['success']: if banned_user['success']:
entry = ('ban', u'%s : %s %s a réussi à t\'avoir.' \ entry = ('ban', u'%s : %s %s a réussi à t\'avoir.' \
% (date, source['firstname'], source['name'])) % (date, source['firstname'], source['name']))
else: else:
entry = ('warn', u'%s : %s %s a essayé de te trancher, en vain.' \ entry = ('warn', u'%s : %s %s a essayé de te trancher, en vain.' \
% (date, source['firstname'], source['name'])) % (date, source['firstname'], source['name']))
else: else:
if banned['success']: if banned_user['success']:
entry = ('ok', u'%s : Tu as tranché %s %s avec succès.' \ entry = ('ok', u'%s : Tu as tranché %s %s avec succès.' \
% (date, target['firstname'], target['name'])) % (date, target['firstname'], target['name']))
else: else:

View file

@ -32,7 +32,7 @@ $(function () {
text: 'Etat du Rezo', text: 'Etat du Rezo',
align: 'center', align: 'center',
verticalAlign: 'middle', verticalAlign: 'middle',
y: 40 y: 60
}, },
tooltip: { tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'

View file

@ -34,7 +34,7 @@ $(function () {
text: 'Etat du Rezo', text: 'Etat du Rezo',
align: 'center', align: 'center',
verticalAlign: 'middle', verticalAlign: 'middle',
y: 40 y: 60
}, },
tooltip: { tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'

View file

@ -34,7 +34,7 @@
text: 'Etat du Rezo', text: 'Etat du Rezo',
align: 'center', align: 'center',
verticalAlign: 'middle', verticalAlign: 'middle',
y: 40 y: 60
}, },
tooltip: { tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'

View file

@ -20,7 +20,7 @@ $(function () {
text: 'Etat du Rezo', text: 'Etat du Rezo',
align: 'center', align: 'center',
verticalAlign: 'middle', verticalAlign: 'middle',
y: 40 y: 60
}, },
tooltip: { tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'

View file

@ -33,7 +33,7 @@ $(function () {
text: 'Etat du Rezo', text: 'Etat du Rezo',
align: 'center', align: 'center',
verticalAlign: 'middle', verticalAlign: 'middle',
y: 40 y: 60
}, },
tooltip: { tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'

View file

@ -17,7 +17,7 @@ $(function () {
text: 'Etat du Rezo', text: 'Etat du Rezo',
align: 'center', align: 'center',
verticalAlign: 'middle', verticalAlign: 'middle',
y: 40 y: 60
}, },
tooltip: { tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'