From d065a79f147341f2bc3a9cf2c96a4e8c94b98b6a Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 25 Mar 2017 21:25:12 +0100 Subject: rewrite to update data explicitely --- templates/index.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'templates') diff --git a/templates/index.html b/templates/index.html index e6b6ee1..4b96767 100644 --- a/templates/index.html +++ b/templates/index.html @@ -68,7 +68,7 @@
-

{{ sql_val("SELECT SUM(turret_kills) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.turrets_rebuilt }}

rebuilt by workers every day

@@ -83,7 +83,7 @@
-

{{ sql_val("SELECT SUM(minion_kills) FROM participant WHERE NOT winner AND created_at > NOW() - '1 day'::INTERVAL") }}
out of {{ sql_val("SELECT SUM(minion_kills) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.minions_for_nothing }}
out of {{ data.minions_total }}

died for nothing

@@ -98,7 +98,7 @@
-

{{ sql_val("SELECT COUNT((item_grants->>'*1045_Item_FountainOfRenewal*')::INT)-COUNT((item_uses->>'*1045_Item_FountainOfRenewal*')::INT) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.fountains_wasted }}

bought for the looks

@@ -113,7 +113,7 @@
-

{{ sql_val("SELECT SUM(participant.crystal_mine_captures) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.crystal_sentries }}

slaughtered

@@ -128,7 +128,7 @@
-

{{ sql_val("SELECT SUM((participant.item_sells->>'*1038_Item_Flare*')::INT) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.flares_sold }}

thrown in trash

@@ -143,7 +143,7 @@
-

{{ sql_val("SELECT (SUM(match.duration)/60*5) / SUM(roster.kraken_captures) FROM match JOIN roster ON roster.match_api_id=match.api_id WHERE match.created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.minions_per_kraken }}

are needed to unleash a Kraken

@@ -158,7 +158,7 @@
-

{{ sql_val("SELECT SUM((item_uses->>'*1041_Item_MinionCandy*')::INT) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.minion_candies }}

Minion parties

@@ -173,7 +173,7 @@
every
-

{{ sql_val("SELECT SUM(match.duration)/60 / (SUM((participant.item_uses->>'*1052_Item_WeaponInfusion*')::INT) + SUM((participant.item_uses->>'*1053_Item_CrystalInfusion*')::INT)) FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }}
minutes

+

{{ data.infusions_min }}
minutes

a hero gets high

@@ -189,7 +189,7 @@
-

{{ sql_val("SELECT SUM((item_uses->>'*1054_Item_ScoutTrap*')::INT) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.scout_traps }}

made the Fold a Dangerous Place

@@ -205,7 +205,7 @@
-

{{ sql_val("SELECT SUM(turret_kills) FROM participant WHERE hero='*SAW*' AND created_at > NOW() - '1 day'::INTERVAL") }}

+

{{ data.saw_turrets }}

were pushed by SAW in the last 24h

@@ -222,7 +222,7 @@

Based on Vainsocial users' data from the past 24 hours that by no means is representative to the whole player base of Vainglory.

- +
@@ -261,7 +261,7 @@