Add ability to see history of http functions invocations
This commit is contained in:
12
app.py
12
app.py
@@ -139,6 +139,18 @@ def delete_http_function():
|
||||
except Exception as e:
|
||||
return jsonify({"status": 'error', "message": str(e)}), 500
|
||||
|
||||
@ app.route("/dashboard/http_functions/logs", methods=["GET"])
|
||||
def get_http_function_logs():
|
||||
name = request.args.get('name')
|
||||
http_function = db.get_http_function(name)
|
||||
if not http_function:
|
||||
return jsonify({'error': 'Function not found'}), 404
|
||||
|
||||
http_function_id = http_function['id']
|
||||
http_function_invocations = db.get_http_function_invocations(http_function_id)
|
||||
return render_template("dashboard/http_functions/logs.html", name=name, http_function_invocations=http_function_invocations)
|
||||
|
||||
|
||||
@ app.route("/dashboard/timer_functions", methods=["GET"])
|
||||
def dashboard_timer_functions():
|
||||
return render_template("dashboard/timer_functions.html")
|
||||
|
||||
Reference in New Issue
Block a user