Add status page quick actions
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -306,6 +306,13 @@ def health():
|
||||
def api_status():
|
||||
return jsonify(app_status.collect_status())
|
||||
|
||||
@app.route('/api/status/restart-app', methods=['POST'])
|
||||
def api_status_restart_app():
|
||||
try:
|
||||
return jsonify(app_status.request_app_restart()), 202
|
||||
except RuntimeError as error:
|
||||
return jsonify(error=str(error)), 503
|
||||
|
||||
@app.route('/api/alerts/status')
|
||||
def alert_status():
|
||||
return jsonify(app_alerts.get_status())
|
||||
|
||||
Reference in New Issue
Block a user