Add search for activity logs
This commit is contained in:
@@ -53,7 +53,9 @@ def settings_activity():
|
||||
def settings_activity_logs():
|
||||
limit = 50
|
||||
offset = request.args.get('offset', 0, type=int)
|
||||
logs = db.activityRequest.get_recent_logs(limit=limit, offset=offset)
|
||||
search_query = request.args.get('search_query', '')
|
||||
|
||||
logs = db.activityRequest.get_recent_logs(limit=limit, offset=offset, search_query=search_query)
|
||||
|
||||
# Check if there are more logs to load
|
||||
has_more = len(logs) == limit
|
||||
@@ -61,4 +63,6 @@ def settings_activity_logs():
|
||||
return render_template('partials/activity_logs.html',
|
||||
logs=logs,
|
||||
offset=offset,
|
||||
has_more=has_more)
|
||||
has_more=has_more,
|
||||
search_query=search_query,
|
||||
limit=limit)
|
||||
|
||||
Reference in New Issue
Block a user