Might aswell use existing fields in server_details.html.
This commit is contained in:
parent
a453b4dbf0
commit
02702a4ddb
@ -13,13 +13,8 @@ class ServerDetailView(generic.DetailView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ServerDetailView, self).get_context_data(**kwargs)
|
||||
server = context['server']
|
||||
|
||||
history = PlayerHistory()
|
||||
points = history.get_points(server)
|
||||
context['player_history'] = points
|
||||
|
||||
timestamp, players = points[0]
|
||||
context['last_updated'] = timestamp
|
||||
context['online_players'] = players
|
||||
return context
|
||||
|
||||
|
||||
@ -18,10 +18,10 @@
|
||||
{% endif %}
|
||||
|
||||
<h2>Server History</h2>
|
||||
<p>Last updated <span title="{{last_updated|date:'r'}} GMT">
|
||||
{{last_updated|timesince}}
|
||||
<p>Last updated <span title="{{server.last_updated|date:'r'}} GMT">
|
||||
{{server.last_updated|timesince}}
|
||||
</span>ago.</p>
|
||||
<p>Online players: {{online_players}}</p>
|
||||
<p>Online players: {{server.current_players}}</p>
|
||||
|
||||
<div id="chart"></div>
|
||||
<div id="tooltip"></div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user