- Add diagram_layouts and diagram_nodes tables - Seed layout coordinates extracted from SVG - Extend snapshot API to return layout data - Rewrite demo page to fetch from API dynamically - Support ?mission= and ?at= URL parameters - Modal details populated from database component data - Show/hide nodes based on component existence at snapshot time Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
493 B
Python
23 lines
493 B
Python
# topology_api/app.py
|
|
from flask import Flask
|
|
from flask_cors import CORS
|
|
from topology_api.config import API_HOST, API_PORT, API_DEBUG
|
|
from topology_api.routes.snapshot import snapshot_bp
|
|
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
CORS(app)
|
|
app.register_blueprint(snapshot_bp)
|
|
|
|
@app.route("/health")
|
|
def health():
|
|
return {"status": "ok"}
|
|
|
|
return app
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = create_app()
|
|
app.run(host=API_HOST, port=API_PORT, debug=API_DEBUG)
|