Start of linking fame quality

pull/7/head
Sami Mokaddem 2017-11-14 15:44:53 +01:00
parent 8eae00f6b5
commit 2b3a5be907
3 changed files with 16 additions and 0 deletions

View File

@ -193,6 +193,11 @@ def contrib():
min_between_reload=cfg.getint('CONTRIB', 'min_between_reload')
)
@app.route("/users")
def users():
return render_template('users.html',
)
''' INDEX '''
@app.route("/_logs")
@ -353,6 +358,15 @@ def getFameContributor():
date = (datetime.datetime(today.year, today.month, 1) - datetime.timedelta(days=1))
return getTopContributor(suppliedDate=date)
@app.route("/_getFameQualContributor")
def getFameQualContributor():
try:
date = datetime.datetime.fromtimestamp(float(request.args.get('date')))
except:
today = datetime.datetime.now()
# get previous month
date = (datetime.datetime(today.year, today.month, 1) - datetime.timedelta(days=1))
return getTopContributor(suppliedDate=date)
@app.route("/_getTop5Overtime")
def getTop5Overtime():

View File

@ -594,6 +594,7 @@ $(document).ready(function() {
addToTableFromJson(datatableTop, url_getTopContributor);
// hall of fame
addToTableFromJson(datatableFameQuant, url_getFameContributor);
addToTableFromJson(datatableFameQual, url_getFameQualContributor);
// last contributors
addLastFromJson(datatableLast, url_getLastContributor);
// category per contributors

View File

@ -468,6 +468,7 @@
/* URL */
var url_getTopContributor = "{{ url_for('getTopContributor') }}";
var url_getFameContributor = "{{ url_for('getFameContributor') }}";
var url_getFameQualContributor = "{{ url_for('getFameQualContributor') }}";
var url_getCategPerContrib = "{{ url_for('getCategPerContrib') }}";
var url_getTop5Overtime = "{{ url_for('getTop5Overtime') }}";
var url_getOrgOvertime = "{{ url_for('getOrgOvertime') }}";