Commit b60e61a7 authored by Zixian Cai's avatar Zixian Cai

Disable useless routers

parent 4f8125bc
......@@ -25,36 +25,6 @@ app = Flask(__name__)
app.config['SECRET_KEY'] = settings.WEB_SECRET
@app.route("/<repo>/<host>/timeline")
def result_timeline(repo, host):
pass
@app.route("/<repo>/<host>/<rev>/visualize")
def result_visualize(repo, host, rev):
result = storage.load(repo, host, rev)
return render_template("visualize.html", result=result)
@app.route("/<repo>/<host>/<rev>/store", methods=["POST"])
def result_store(repo, host, rev):
if "logfile" not in request.files:
flash("No log file uploaded")
return redirect(url_for("index"))
logfile = request.files["logfile"]
timestamp = request.form.get("timestamp")
storage.store(repo, host, rev, timestamp, logfile.read())
return redirect(url_for("index"))
@app.route("/<repo>/<host>/<rev>/compare/<repo1>/<host1>/<rev1>")
def result_compare(repo, host, rev, repo1, host1, rev1):
result = storage.load(repo, host, rev)
result1 = storage.load(repo1, host1, rev1)
return render_template("changes.html",
result=changes.compare(result, result1))
@app.route("/visualize_file", methods=["POST"])
def visualize_file():
if "logfile" not in request.files:
......@@ -77,10 +47,12 @@ def index():
result = storage.load_relative(repo, host, 0)
result1 = storage.load_relative(repo, host, 1)
result2 = storage.load_all(repo, host)
tl, tl_revisions = timeline.make_timeline(result2)
return render_template("index.html",
visualzing=result,
changes=changes.compare(result, result1),
timeline=timeline.make_timeline(result2))
timeline=tl,
timeline_revisions=tl_revisions)
@click.command()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment