forked from Minecraft/minecraft_manager
Changed ratios to percentages
parent
611c4e1934
commit
9f3d7e7ae3
|
@ -43,10 +43,10 @@ def overview_data():
|
||||||
|
|
||||||
# Ratios
|
# Ratios
|
||||||
data['ratio'] = {
|
data['ratio'] = {
|
||||||
'accepted': data['total']['application']['accepted'] /
|
'accepted': (data['total']['application']['accepted'] /
|
||||||
data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1,
|
data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100,
|
||||||
'banned': data['total']['player']['banned'] /
|
'banned': (data['total']['player']['banned'] /
|
||||||
data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1
|
data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-9 col-md-6">
|
<div class="col-xs-9 col-md-6">
|
||||||
<h3>Acceptance Rate: {{ data.ratio.accepted }}</h3>
|
<h3>Acceptance Rate: {{ data.ratio.accepted }}%</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-9 col-md-6">
|
<div class="col-xs-9 col-md-6">
|
||||||
<h3>Ban Rate: {{ data.ratio.banned }}</h3>
|
<h3>Ban Rate: {{ data.ratio.banned }}%</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue