- reverted experiment that was supposed to never be saved, but broke iframes.

This commit is contained in:
Ross Mountjoy 2020-03-30 17:45:39 -04:00
parent 15395d0f8d
commit 170daf1b81

View File

@ -48,20 +48,14 @@ def home():
@main.route("/app_view?<app_id>", methods=["GET"]) @main.route("/app_view?<app_id>", methods=["GET"])
@main.route("/app_view?<url>", methods=["GET"]) def app_view(app_id):
def app_view(app_id, url=None):
settings = Settings.query.first() settings = Settings.query.first()
if not check_groups(settings.home_access_groups, current_user): if not check_groups(settings.home_access_groups, current_user):
return redirect(url_for("user_system.login")) return redirect(url_for("user_system.login"))
app_db = Apps.query.filter_by(id=app_id).first()
if url: return render_template(
title = url "main/app-view.html", url=f"{app_db.prefix}{app_db.url}", title=app_db.name
)
if not url:
app_db = Apps.query.filter_by(id=app_id).first()
url = f"{app_db.prefix}{app_db.url}"
title = app_db.name
return render_template("main/app-view.html", url=url, title=title)
@main.route("/load_data_source", methods=["GET"]) @main.route("/load_data_source", methods=["GET"])