Ant Zucaro [Fri, 28 Oct 2016 23:55:20 +0000 (19:55 -0400)]
Make models a package instead of being a single (huge) module.
Ant Zucaro [Fri, 28 Oct 2016 21:20:46 +0000 (17:20 -0400)]
A little bit more code cleanup.
Ant Zucaro [Sun, 23 Oct 2016 18:03:20 +0000 (14:03 -0400)]
Merge pull request #24 from antzucaro/server-refactor
Merge the server views refactor.
Ant Zucaro [Sun, 23 Oct 2016 15:36:15 +0000 (11:36 -0400)]
Oops, it should be application/json not text/json.
Ant Zucaro [Sun, 23 Oct 2016 14:16:38 +0000 (10:16 -0400)]
Add the 'plus' link to the recent games table too.
Ant Zucaro [Sun, 23 Oct 2016 14:12:41 +0000 (10:12 -0400)]
Add links to the tables, rename the template to be consistent.
Ant Zucaro [Sun, 23 Oct 2016 14:02:09 +0000 (10:02 -0400)]
Add lifetime value to all server top* HTML views.
Ant Zucaro [Sun, 23 Oct 2016 13:56:45 +0000 (09:56 -0400)]
Make the return values consistent.
Ant Zucaro [Sun, 23 Oct 2016 13:24:34 +0000 (09:24 -0400)]
Add HTML views for top active players, scoring players, and maps played.
Ant Zucaro [Sun, 23 Oct 2016 11:51:05 +0000 (07:51 -0400)]
Show the correct lifetime information in the template.
Ant Zucaro [Sun, 23 Oct 2016 11:47:36 +0000 (07:47 -0400)]
Add rank-fetching in the view, make the template easier to handle.
Ant Zucaro [Sat, 22 Oct 2016 13:50:27 +0000 (09:50 -0400)]
Limit and last are query params, not match params.
Ant Zucaro [Sat, 22 Oct 2016 13:36:57 +0000 (09:36 -0400)]
Add limits and offsets to all 'top' views.
Ant Zucaro [Sat, 22 Oct 2016 12:33:04 +0000 (08:33 -0400)]
Change around the organization of ServerInfo.
Ant Zucaro [Wed, 19 Oct 2016 00:53:17 +0000 (20:53 -0400)]
No newlines for beneath the init methods.
Ant Zucaro [Wed, 19 Oct 2016 00:45:04 +0000 (20:45 -0400)]
Add a JSON method to the ServerInfo view.
Ant Zucaro [Wed, 19 Oct 2016 00:21:35 +0000 (20:21 -0400)]
Flatten the lines a bit.
Ant Zucaro [Tue, 18 Oct 2016 01:47:45 +0000 (21:47 -0400)]
More server refactoring...still not sure if this is the right way to go.
Ant Zucaro [Sun, 16 Oct 2016 15:25:41 +0000 (11:25 -0400)]
Convert the server info to a class-based view callable. Add a dummy JSON view.
Ant Zucaro [Sun, 16 Oct 2016 14:22:59 +0000 (10:22 -0400)]
Add docstrings.
Ant Zucaro [Sun, 16 Oct 2016 13:50:51 +0000 (09:50 -0400)]
Convert the server index to a class-based view callable. Add a JSON view.
Ant Zucaro [Sun, 26 Jun 2016 16:41:25 +0000 (12:41 -0400)]
Use pserve, not paster.
Ant Zucaro [Tue, 29 Mar 2016 01:11:43 +0000 (21:11 -0400)]
Show player medals on the player_info page.
Ant Zucaro [Sat, 12 Mar 2016 14:22:26 +0000 (09:22 -0500)]
Add a simple form for the versus view.
Ant Zucaro [Sat, 12 Mar 2016 13:39:55 +0000 (08:39 -0500)]
Initial version of the "versus" view between two players.
Ant Zucaro [Sat, 6 Feb 2016 21:28:13 +0000 (16:28 -0500)]
Rename the "top" templates to match their views.
Ant Zucaro [Sat, 6 Feb 2016 21:21:44 +0000 (16:21 -0500)]
Make the active players/servers/maps use the cache.
Instead of fetching from the base data, the active players/server/maps views
will fetch from the so-called "materialized view" tables instead. These tables
are precomputed and will be MUCH faster, performance-wise. Regular Beaker
caching remains the same for these, and the paginated pages now only support
clicking "more" until the list is exhausted. Perhaps in the future they will be
fetched via JSON and appended to the page in a "never-ending scroll" thing.
Ant Zucaro [Sun, 31 Jan 2016 14:56:04 +0000 (09:56 -0500)]
Merge branch 'master' of github.com:antzucaro/XonStat
Ant Zucaro [Sun, 31 Jan 2016 14:55:50 +0000 (09:55 -0500)]
Use the summary_stats_mv instead of the full table.
Ant Zucaro [Wed, 27 Jan 2016 01:16:57 +0000 (20:16 -0500)]
Force create_dt to start_dt for games.
There's some drift in the database between the two, when in actuality they
should only be milliseconds apart. The start_dt *was* being set via the
application and the create_dt with a database default. The values resulting
from the defaults were sometimes minutes earlier, which doesn't makes sense.
Until the true cause is identified I'll force the two to be the same.
Ant Zucaro [Wed, 27 Jan 2016 01:10:28 +0000 (20:10 -0500)]
Add another sorting option to player_captimes.
You can now sort by two fields: most recent and fastest. This is done with a
line at the bottom of the table that allows you to toggle. Fixes #163.
Ant Zucaro [Mon, 25 Jan 2016 21:02:33 +0000 (16:02 -0500)]
Add a plus-sign link to the player_game_index.
Ant Zucaro [Sat, 23 Jan 2016 15:51:36 +0000 (10:51 -0500)]
Fix the navigation icons. Fixes #161.
For some reason the navigation links were still using the old "glyphicon" font
classes. This meant that the actual "previous" and "next" page links weren't
actually visible, leading to some navigation issues. Changing them to the
font-awesome classes makes them visible again!
Ant Zucaro [Sat, 23 Jan 2016 15:40:50 +0000 (10:40 -0500)]
Make the rank index titles data-driven.
Ant Zucaro [Sat, 23 Jan 2016 15:08:41 +0000 (10:08 -0500)]
Whitelist rank game types in the view. Fixes #162.
The game types where you could view ranks were previously controlled by a
regular expression check within the route. This was completely NOT obvious to
troubleshoot. This moves them to within the view, which is much easier to
control. Additionally, a 404-check is added for malformed values.
Ant Zucaro [Sat, 23 Jan 2016 14:50:02 +0000 (09:50 -0500)]
Clean up the game info view.
Ant Zucaro [Thu, 21 Jan 2016 02:46:22 +0000 (21:46 -0500)]
The player JSON view should use to_dict() instead.
Ant Zucaro [Thu, 21 Jan 2016 02:43:13 +0000 (21:43 -0500)]
Make the game finder JSON-enabled.
This allows applications to get "recent games" via an API.
Ant Zucaro [Mon, 18 Jan 2016 22:22:45 +0000 (17:22 -0500)]
Foundation columns should add up to 12, not 13.
Ant Zucaro [Sat, 16 Jan 2016 22:55:46 +0000 (17:55 -0500)]
Reduce the number of fast caps shown on the map_info page.
Ant Zucaro [Sat, 16 Jan 2016 22:48:29 +0000 (17:48 -0500)]
Add a link to view the fastest capture times on the map_info page.
Ant Zucaro [Sat, 16 Jan 2016 22:36:56 +0000 (17:36 -0500)]
Move MapCapTime and PlayerCapTime to models.
The more I thought about it, the more I think that these two classes should
live inside the models module. They are nothing more than models for views. So
what if they aren't object-relational!
Ant Zucaro [Sat, 16 Jan 2016 13:00:58 +0000 (08:00 -0500)]
Throw HTTP 404s if either the player or map do not exist.
Ant Zucaro [Sat, 16 Jan 2016 12:45:28 +0000 (07:45 -0500)]
Allow fetching player captimes using the JSON endpoint.
Ant Zucaro [Sat, 16 Jan 2016 00:15:23 +0000 (19:15 -0500)]
Fix the JSON view for map captimes.
Ant Zucaro [Sun, 29 Nov 2015 15:07:55 +0000 (10:07 -0500)]
Clean up xs_submit.
This was written when I didn't really know that much Golang. I know a little
bit more about it now, so I can at least format accordingly! Also I know how to
use a Scanner now. Shame on my past self...
Ant Zucaro [Sun, 29 Nov 2015 15:06:27 +0000 (10:06 -0500)]
Add ranks to the post-match template.
Ant Zucaro [Sun, 29 Nov 2015 15:05:08 +0000 (10:05 -0500)]
Fetch ranks for the post-match report.
The ranks are updated daily, so they don't change game-per-game for an
individual, but having the rank value still tells people how strong a player
is that they've been playing against.
Ant Zucaro [Thu, 19 Nov 2015 13:21:47 +0000 (08:21 -0500)]
Use raw ID values, not URLs.
The game doesn't have clickable links anyway.
Ant Zucaro [Thu, 19 Nov 2015 03:09:13 +0000 (22:09 -0500)]
Remove k-factor, score-per-second, and alivetime.
The k-factor and score-per-second values don't have any use for the game UI and
the server already knows the alivetime values of all participants.
Ant Zucaro [Thu, 19 Nov 2015 01:29:07 +0000 (20:29 -0500)]
Provide a plaintext response to stats submissions.
For all of XonStat's history the POST requests sent in by servers had plain
HTTP responses. This begins to change with this commit, which responds back to
the Xonotic server with meaningful information about /what happened/ during the
match that was just submitted. Of particular importance are the player_ids and
elo delta values that were stored as a result of the game. The template
establishing the format for this is submit_stats.mako. It will be extended
after we decide what other things we want to include.
Ant Zucaro [Sat, 14 Nov 2015 21:20:33 +0000 (16:20 -0500)]
Refactor the Elo processing code into EloProcessor.
Before, Elo processing was simply a couple of extra methods that mutated
PlayerGameStat and PlayerElo rows, adding them to a session for updating or
inserting later. In order to support an end-of-match game report, we now need
to hold onto to those intermediate values so they can be passed into a
template. To do this I created an EloProcessor class to perform all of the
computation and an EloWIP class to hold onto all of the intermediate values.
EloProcessor can be used to find out what changed during Elo calculations.
Ant Zucaro [Sun, 8 Nov 2015 23:12:15 +0000 (18:12 -0500)]
Get rid of some commented, unused code.
Ant Zucaro [Sun, 8 Nov 2015 19:22:01 +0000 (14:22 -0500)]
Clean up the production configuration file.
This includes a little better organization of the production.ini file for
administrators. It includes comments on the different directives, better
indentation, and rotating log files of limited size using Python's
logging.handlers.RotatingFileHandler facility.
Ant Zucaro [Sat, 7 Nov 2015 15:15:54 +0000 (10:15 -0500)]
Don't put anonymous players in games.players
The "games" table has a convenience, de-normalized column for storing the list
of player_ids who played in that game. This is intended for use in quick
searches. Since anonymous players (players having a player_id == 2) aren't
searchable, they don't need to be in this list. This should decrease the
overall size of the GIN index on that column over time.
Ant Zucaro [Sat, 7 Nov 2015 15:09:57 +0000 (10:09 -0500)]
Use only one regex to identify bots
Two is wasteful.
Ant Zucaro [Thu, 29 Oct 2015 00:55:11 +0000 (20:55 -0400)]
Merge pull request #22 from antzucaro/nvd3-v2
Go back to NVD3.js
Ant Zucaro [Thu, 29 Oct 2015 00:49:19 +0000 (20:49 -0400)]
Add nvd3 css, integrate charts in the player_info page.
Ant Zucaro [Thu, 29 Oct 2015 00:48:24 +0000 (20:48 -0400)]
Add minified version of the weapon charts.
Ant Zucaro [Thu, 29 Oct 2015 00:47:43 +0000 (20:47 -0400)]
Change margin of the weaponCharts.
Ant Zucaro [Mon, 26 Oct 2015 22:14:16 +0000 (18:14 -0400)]
Add NVD3.js to vendor.
Ant Zucaro [Mon, 26 Oct 2015 22:14:01 +0000 (18:14 -0400)]
Add D3.js to vendor.
Ant Zucaro [Wed, 8 Jul 2015 11:02:15 +0000 (07:02 -0400)]
Store and show goals in the "caps" field of team scores. Fixes #155.
Ant Zucaro [Sat, 13 Jun 2015 13:38:23 +0000 (09:38 -0400)]
Oops, off-by-one error on the damageChart series.
Ant Zucaro [Sat, 13 Jun 2015 13:23:10 +0000 (09:23 -0400)]
Store player-to-map captimes by mod.
Ant Zucaro [Sat, 13 Jun 2015 12:01:24 +0000 (08:01 -0400)]
Store impure cvar changes, and use them to mark servers as pure or not.
Ant Zucaro [Sat, 6 Jun 2015 13:20:58 +0000 (09:20 -0400)]
Make valid NB games those w/ nonzero scores ONLY. Fixes #152.
Ant Zucaro [Sat, 6 Jun 2015 13:13:46 +0000 (09:13 -0400)]
Remove the rifle from the damage and accuracy charts.
Ant Zucaro [Sat, 6 Jun 2015 04:00:42 +0000 (00:00 -0400)]
Minify the new weaponCharts code.
Ant Zucaro [Fri, 5 Jun 2015 15:41:38 +0000 (11:41 -0400)]
Merge branch 'master' of gitlab.com:xonotic/xonstat
Ant Zucaro [Fri, 5 Jun 2015 15:30:40 +0000 (11:30 -0400)]
Add Arc to the damage chart.
Ant Zucaro [Wed, 6 May 2015 02:38:26 +0000 (02:38 +0000)]
Merge branch 'sev/unicode_mapping_fix' into 'master'
Correct the mapping of the smiling emoticon
I noticed that one of my unicode mappings is incorrect. Sorry about that.
This branch changes U+1F60F (😏) to the correct U+1F603 (😃).
See merge request !2
Severin Meyer [Mon, 4 May 2015 17:39:49 +0000 (19:39 +0200)]
Correct the mapping of the smiling emoticon
Ant Zucaro [Wed, 29 Apr 2015 22:27:04 +0000 (18:27 -0400)]
Use class, not style. Doh!
Ant Zucaro [Fri, 24 Apr 2015 12:18:25 +0000 (08:18 -0400)]
Remove spaces that cause offset issues on Chrome.
Ant Zucaro [Wed, 22 Apr 2015 11:00:07 +0000 (07:00 -0400)]
Add Arc to the accuracy table.
Ant Zucaro [Wed, 22 Apr 2015 10:52:21 +0000 (06:52 -0400)]
Clean up comments.
Ant Zucaro [Wed, 22 Apr 2015 10:48:25 +0000 (06:48 -0400)]
Remove the join to game stats for accuracy data.
This speeds up the game_info view considerably. On my local machine the
requests go from .62 to about .2 seconds! I believe the pgstat rows were
included in the response to show nicknames in the accuracy table.
I'll have to do further checks to ensure that if a pgstat row exists a
corresponding pwstat row exists as well.
Ant Zucaro [Sun, 19 Apr 2015 20:02:20 +0000 (16:02 -0400)]
Fix the machinegun sprite and sync CSS. Fixes #149.
Ant Zucaro [Sun, 19 Apr 2015 19:51:34 +0000 (15:51 -0400)]
Use Luma game type icons on the player-recent-games view. Fixes #150.
Ant Zucaro [Sun, 19 Apr 2015 19:48:05 +0000 (15:48 -0400)]
The game_index template has not been used in a long, long time.
Ant Zucaro [Sun, 19 Apr 2015 14:04:43 +0000 (10:04 -0400)]
Copy the mono icon for local reference.
Ant Zucaro [Sun, 19 Apr 2015 12:38:25 +0000 (08:38 -0400)]
Set a color for the Arc.
Ant Zucaro [Sun, 19 Apr 2015 12:35:24 +0000 (08:35 -0400)]
Bundle in Luma.
Ant Zucaro [Sun, 19 Apr 2015 12:32:13 +0000 (08:32 -0400)]
Add combined CSS.
Ant Zucaro [Sun, 19 Apr 2015 12:19:08 +0000 (08:19 -0400)]
Add more width to the grid.
Ant Zucaro [Sun, 19 Apr 2015 12:10:27 +0000 (08:10 -0400)]
Fix the display of the weapon icon on mobile.
Ant Zucaro [Sun, 19 Apr 2015 12:06:49 +0000 (08:06 -0400)]
Use Luma throughout the site. Thank you, sev!
Ant Zucaro [Sun, 19 Apr 2015 12:05:31 +0000 (08:05 -0400)]
Add Luma font and styles.
Ant Zucaro [Sun, 12 Apr 2015 14:32:08 +0000 (10:32 -0400)]
Fix the recent games table for the server info page.
Ant Zucaro [Sun, 12 Apr 2015 13:18:24 +0000 (09:18 -0400)]
Make the player game index page mobile-friendly.
Ant Zucaro [Sun, 12 Apr 2015 13:05:56 +0000 (09:05 -0400)]
Clean up the accuracy tables, make them mobile friendly.
Ant Zucaro [Sun, 12 Apr 2015 01:36:38 +0000 (21:36 -0400)]
Style the game table for keyhunt.
Ant Zucaro [Sun, 12 Apr 2015 01:26:08 +0000 (21:26 -0400)]
Style the game table for ca, dm, duel, rune, and tdm.
Ant Zucaro [Sun, 12 Apr 2015 01:18:48 +0000 (21:18 -0400)]
Color score cells yellow.
Ant Zucaro [Sun, 12 Apr 2015 01:14:46 +0000 (21:14 -0400)]
Format duel and ctf scoreboards.
Ant Zucaro [Sun, 12 Apr 2015 01:14:01 +0000 (21:14 -0400)]
Use all columns for mobile game tables.
Ant Zucaro [Sat, 11 Apr 2015 00:26:15 +0000 (20:26 -0400)]
Customize accordion behavior.
Ant Zucaro [Sat, 11 Apr 2015 00:26:00 +0000 (20:26 -0400)]
Define a new block for Foundation customizations.
Ant Zucaro [Sat, 11 Apr 2015 00:21:04 +0000 (20:21 -0400)]
Improved accuracy tabs on the game page.