mirror of https://github.com/MISP/misp-dashboard
Start of linking fame quality
parent
8eae00f6b5
commit
2b3a5be907
14
server.py
14
server.py
|
@ -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():
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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') }}";
|
||||
|
|
Loading…
Reference in New Issue