mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Merge pull request #788 from bunkerity/ui
Merge branch "ui" into branch "dev"
This commit is contained in:
commit
8302bee4d1
2 changed files with 205 additions and 271 deletions
|
|
@ -29,6 +29,7 @@ from docker.errors import (
|
|||
)
|
||||
from flask import (
|
||||
Flask,
|
||||
Response,
|
||||
flash,
|
||||
jsonify,
|
||||
redirect,
|
||||
|
|
@ -352,6 +353,14 @@ def loading():
|
|||
)
|
||||
|
||||
|
||||
@app.route("/check", methods=["GET"])
|
||||
def check():
|
||||
if "Origin" not in request.headers:
|
||||
return Response(status=403)
|
||||
|
||||
return Response(status=200, headers={"Access-Control-Allow-Origin": "*"})
|
||||
|
||||
|
||||
@app.route("/setup", methods=["GET", "POST"])
|
||||
def setup():
|
||||
if app.config["USER"]:
|
||||
|
|
@ -433,7 +442,7 @@ def setup():
|
|||
kwargs={"operation": "new"},
|
||||
).start()
|
||||
|
||||
return redirect(url_for("loading", next=url_for("services"), message=f"Creating service {request.form['server_name']} for the web UI"))
|
||||
return Response(status=200)
|
||||
|
||||
return render_template(
|
||||
"setup.html",
|
||||
|
|
|
|||
465
src/ui/templates/setup.html
vendored
465
src/ui/templates/setup.html
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue