Add lifetime value to all server top* HTML views.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 23 Oct 2016 14:02:09 +0000 (10:02 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 23 Oct 2016 14:02:09 +0000 (10:02 -0400)
xonstat/templates/server_top_maps.mako
xonstat/templates/server_top_players_index.mako
xonstat/templates/server_top_scorers.mako
xonstat/views/server.py

index 9fdfe14fa23d159d206f49e06ec4238fc5d27a16..93819c265aeba88a7740009f8389e3cc3db881dc 100644 (file)
@@ -36,7 +36,7 @@
         % endfor
         </tbody>
       </table>
-      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
+      <p class="text-center"><small>Note: these figures are from the past ${lifetime} days</small>
     </div>
   </div>
 
index 3bba6d59622858ae796e61c05e98f8c2f7dac5ff..344a02e8bf78cc673de943a1febbcacd6df87f1a 100644 (file)
@@ -38,7 +38,7 @@
         % endfor
         </tbody>
       </table>
-      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
+      <p class="text-center"><small>Note: these figures are from the past ${lifetime} days</small>
     </div>
   </div>
 
index ade10d5afbaeaeeb8b589acd519571db9216c153..0a1f63df0e32eaa5a131648a72f23df9d9241e6d 100644 (file)
@@ -36,7 +36,7 @@
         % endfor
         </tbody>
       </table>
-      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
+      <p class="text-center"><small>Note: these figures are from the past ${lifetime} days</small>
     </div>
   </div>
 
index 9cf7d91950731c05ae938d9220097030b2b4f380..6aae2c3f69d5c4cf50481ccb35b7135b27a7b7f2 100644 (file)
@@ -117,6 +117,7 @@ class ServerTopMaps(ServerInfoBase):
         return {
             "server_id": self.server_id,
             "top_maps": self.top_maps,
+            "lifetime": self.lifetime,
             "query": query,
         }
 
@@ -190,6 +191,7 @@ class ServerTopScorers(ServerInfoBase):
         return {
             "server_id": self.server_id,
             "top_scorers": top_scorers,
+            "lifetime": self.lifetime,
             "query": query,
         }
 
@@ -262,6 +264,7 @@ class ServerTopPlayers(ServerInfoBase):
         return {
             "server_id": self.server_id,
             "top_players": top_players,
+            "lifetime": self.lifetime,
             "query": query,
         }