Commit b6a2be26 authored by Zixian Cai's avatar Zixian Cai

Visualizing individual commit

parent 6f6a0936
......@@ -28,6 +28,15 @@ root = Blueprint('root', __name__,
@root.route("/visualize_commit", methods=["POST"])
def visualize_commit():
repo, host = settings.WEB_POI_REPO, settings.WEB_POI_HOST
logfile = storage.load(repo, host, request.form.get("commit"))
result = json.loads(
return render_template("visualize.html", result=result)
@root.route("/visualize_file", methods=["POST"])
def visualize_file():
if "logfile" not in request.files:
......@@ -16,7 +16,7 @@
{% extends 'base.html' %}
{% block body %}
<div class="panel panel-default">
<div class="panel panel-default">
<div class="panel-heading">Visualizing Log File</div>
<div class="panel-body">
<form action="{{ url_for('root.visualize_file') }}" method="post"
......@@ -28,5 +28,20 @@
<button type="submit" class="btn btn-primary">Display</button>
<div class="panel panel-default">
<div class="panel-heading">Visualizing Commit/div>
<div class="panel-body">
<form action="{{ url_for('root.visualize_comment') }}"
<div class="form-group">
<label for="commit">Log File</label>
<input type="text" name="commit" id="commit">
<button type="submit" class="btn btn-primary">Display
{% endblock %}
\ No newline at end of file
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