-
Notifications
You must be signed in to change notification settings - Fork 2
/
Reporter.py
executable file
·34 lines (23 loc) · 958 Bytes
/
Reporter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
"""Web portal of watchdog for github profile crawler"""
from BaseLogger import BaseLogger
from config import config_report_folder, config_report_port
from flask import Flask, render_template, send_from_directory
app = Flask(__name__)
@app.route('/static/<path>')
def serve_static_files(path):
return send_from_directory(config_report_folder, path)
@app.route('/static/favicon.ico')
def favicon():
return send_from_directory("", "favicon.ico", mimetype='image/vnd.microsoft.icon')
@app.route('/')
def status():
filelist = [
[ "static/delta_summary.svg", "static/delta_page.svg" ],
[ "static/size_summary.svg", "static/size_crawl.svg" ],
[ "static/size_profile.svg", "static/size_page.svg" ],
]
return render_template("dashboard.html", title="gitcrawl dashboard", charts=filelist)
if __name__ == '__main__':
app.debug = True
app.run(host="0.0.0.0", port=config_report_port)