majuna/app/portal/smart_proxy.py
Iain Learmonth 66af6e6550 proxies: add smart proxy support
still to do:

* document new configuration options
* add smart proxies to groups view
* import bandwidth and CPU alarms
2022-05-25 09:07:10 +01:00

17 lines
623 B
Python

from flask import render_template, Blueprint
from flask.typing import ResponseReturnValue
from sqlalchemy import desc
from app.models.mirrors import SmartProxy
bp = Blueprint("smart_proxy", __name__)
@bp.route("/list")
def smart_proxy_list() -> ResponseReturnValue:
instances = SmartProxy.query.filter(SmartProxy.destroyed.is_(None)).order_by(desc(SmartProxy.added)).all()
return render_template("list.html.j2",
section="smart_proxy",
title="Smart Proxy Instances",
item="smart proxy",
items=instances)