Skip to content

Commit

Permalink
Reverse sort the server_index view.
Browse files Browse the repository at this point in the history
  • Loading branch information
antzucaro committed Nov 16, 2011
1 parent 45ad9bb commit 9dd4a12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xonstat/static/css/style.css
Expand Up @@ -368,7 +368,7 @@ input[type=text]:hover, .textbox:hover { background-position:-128px -32px; }
margin-bottom: 10px;
width:100%;
}
#player-index-table {
#player-index-table, #server-index-table{
width: 600px;
}
#map-index-table {
Expand Down
7 changes: 3 additions & 4 deletions xonstat/templates/server_index.mako
Expand Up @@ -9,16 +9,15 @@ Map Index - ${parent.title()}

% else:
<h2>Server Index</h2>
<table border="1">
<table id="server-index-table" border="1">
<tr>
<th>#</th>
<th>Name</th>
<th>IP Address</th>
<th class="create-dt">Added</th>
</tr>
% for server in servers:
<tr>
<td>${server.server_id}</th>
<td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
<td>${server.create_dt.strftime('%m/%d/%Y at %H:%M')}</td>
</tr>
% endfor
</table>
Expand Down
2 changes: 1 addition & 1 deletion xonstat/views/server.py
Expand Up @@ -22,7 +22,7 @@ def server_index(request):

try:
server_q = DBSession.query(Server).\
order_by(Server.name)
order_by(Server.server_id.desc())

servers = Page(server_q, current_page, url=page_url)

Expand Down

0 comments on commit 9dd4a12

Please sign in to comment.