]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Remove the player damage view. It was just used for testing!
authorAnt Zucaro <azucaro@gmail.com>
Wed, 2 Oct 2013 00:52:14 +0000 (20:52 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Wed, 2 Oct 2013 00:52:14 +0000 (20:52 -0400)
xonstat/__init__.py
xonstat/views/__init__.py
xonstat/views/player.py

index f75ab71706b60cdad6db505249938b8d5ff75f93..1c80afbaea234f388927113b7c16d8fb5255c4dc 100644 (file)
@@ -78,9 +78,6 @@ def main(global_config, **settings):
     config.add_route("player_captimes_json", "/player/{id:\d+}/captimes.json")
     config.add_view(player_captimes_json, route_name="player_captimes_json", renderer="jsonp")
 
-    config.add_route("nvd3_damage", "/player/{id:\d+}/damage")
-    config.add_view(player_nvd3_damage, route_name="nvd3_damage", renderer="nvd3_damage.mako")
-
     config.add_route("player_weaponstats_data_json", "/player/{id:\d+}/weaponstats.json")
     config.add_view(player_weaponstats_data_json, route_name="player_weaponstats_data_json", renderer="jsonp")
 
index 38f5275b5638b5664e3cdff4908924e7db549e68..a71c29d5ec2dcfa0961a90ba144bbc229a69d397 100644 (file)
@@ -7,7 +7,7 @@ from xonstat.views.player import player_damage_json
 from xonstat.views.player import player_elo_info_text, player_elo_info_json
 from xonstat.views.player import player_hashkey_info_text, player_hashkey_info_json
 from xonstat.views.player import player_captimes, player_captimes_json
-from xonstat.views.player import player_nvd3_damage, player_weaponstats_data_json
+from xonstat.views.player import player_weaponstats_data_json
 
 from xonstat.views.game   import game_info, rank_index
 from xonstat.views.game   import game_info_json, rank_index_json
index ba8cf0dff42ad0612b24032f8f24a9f3362ad988..41217e5e7d657bde0beb94dbd23d4da5e412c771 100644 (file)
@@ -1030,36 +1030,15 @@ def player_captimes_data(request):
             'player':player,
         }
 
+
 def player_captimes(request):
     return player_captimes_data(request)
 
+
 def player_captimes_json(request):
     return player_captimes_data(request)
 
 
-def player_nvd3_damage(request):
-    player_id = int(request.matchdict['id'])
-    if player_id <= 2:
-        player_id = -1;
-
-    game_type_cd = request.params.get("game_type", None)
-    if game_type_cd == "overall":
-        game_type_cd = None
-
-    limit = 20
-    if request.params.has_key("limit"):
-        limit = int(request.params["limit"])
-
-        if limit < 0:
-            limit = 20
-        if limit > 50:
-            limit = 50
-
-    return { "player_id": player_id,
-        "game_type_cd": game_type_cd,
-        "limit": limit,
-    }
-
 def player_weaponstats_data_json(request):
     player_id = request.matchdict["id"]
     if player_id <= 2: