Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def graph_page():
"""Serve the Cytoscape graph viewer page."""
run_path_param = request.args.get("run_path")
if not run_path_param:
return render_template("graph.html", run_path="")
return redirect(url_for("visualisations_page"))

try:
# Attempt to load the graph data to determine if it's available
Expand Down Expand Up @@ -75,14 +75,18 @@ def visualisations_page():
@app.route("/metrics", methods=["GET"])
def metrics_page():
"""Serve the React CDN sample metrics dashboard."""
run_path_param = request.args.get("run_path", "")
run_path_param = request.args.get("run_path")
if not run_path_param:
return redirect(url_for("visualisations_page"))
return render_template("metrics.html", run_path=run_path_param)

@app.route("/graph-viewmodel", methods=["GET"])
async def graph_viewmodel():
"""Serve the graph data as JSON for the frontend."""
try:
run_path_param = request.args.get("run_path")
if not run_path_param:
return jsonify({"error": "Missing required parameter: run_path"}), 400

graph_data = visualisation_graph_data(run_path_param)

Expand Down
Loading
Loading