home: missing proxy count

This commit is contained in:
Iain Learmonth 2022-04-21 17:14:56 +01:00
parent 9e976d28b5
commit dc59921498

View file

@ -31,10 +31,11 @@ def format_datetime(s):
def portal_home():
groups = Group.query.order_by(Group.group_name).all()
now = datetime.now(timezone.utc)
proxies = Proxy.query.filter(Proxy.destroyed == None).all()
last24 = len(Proxy.query.filter(Proxy.deprecated > (now - timedelta(days=1))).all())
last72 = len(Proxy.query.filter(Proxy.deprecated > (now - timedelta(days=3))).all())
lastweek = len(Proxy.query.filter(Proxy.deprecated > (now - timedelta(days=7))).all())
return render_template("home.html.j2", section="home", groups=groups, last24=last24, last72=last72, lastweek=lastweek)
return render_template("home.html.j2", section="home", groups=groups, last24=last24, last72=last72, lastweek=lastweek, proxies=proxies)
@portal.route("/groups")