feat: 自我进化模块——health_monitor+lesson_extractor+evolution_api+Dashboard+auto_iterator
This commit is contained in:
@@ -1799,6 +1799,30 @@ def api_prd():
|
||||
register_routes(app)
|
||||
|
||||
|
||||
@app.route("/api/evolution/dashboard")
|
||||
def api_evolution_dashboard():
|
||||
"""进化模块 Dashboard"""
|
||||
try:
|
||||
sys.path.insert(0, '/home/hmo/MoFin/evolution')
|
||||
from evolution_api import get_evolution_dashboard
|
||||
return jsonify(get_evolution_dashboard())
|
||||
except Exception as e:
|
||||
return jsonify({'error': str(e)}), 500
|
||||
|
||||
|
||||
@app.route("/api/evolution/health_trend")
|
||||
def api_evolution_health_trend():
|
||||
"""健康度趋势"""
|
||||
try:
|
||||
version = request.args.get('version', 'v_next4')
|
||||
days = int(request.args.get('days', 30))
|
||||
sys.path.insert(0, '/home/hmo/MoFin/evolution')
|
||||
from evolution_api import get_health_trend
|
||||
return jsonify({'trend': get_health_trend(version, days)})
|
||||
except Exception as e:
|
||||
return jsonify({'error': str(e)}), 500
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
port = int(os.environ.get("PORT", 8899))
|
||||
print(f"🚀 MoFin Dashboard → http://0.0.0.0:{port}")
|
||||
|
||||
Reference in New Issue
Block a user