diff --git a/app/routers/recipes.py b/app/routers/recipes.py index 1ba844f..a0ad98e 100644 --- a/app/routers/recipes.py +++ b/app/routers/recipes.py @@ -155,10 +155,18 @@ async def get_recipe( "output": "#f59e0b", } - # Get nodes from dag - can be list or dict + # Get nodes from dag - can be list or dict, can be under "dag" or directly on recipe dag = recipe.get("dag", {}) nodes = dag.get("nodes", []) + # Also check for nodes directly on recipe (alternative formats) + if not nodes: + nodes = recipe.get("nodes", []) + if not nodes: + nodes = recipe.get("pipeline", []) + if not nodes: + nodes = recipe.get("steps", []) + # Convert list of nodes to steps format if isinstance(nodes, list): for node in nodes: diff --git a/app/services/run_service.py b/app/services/run_service.py index 9b514e7..63892d5 100644 --- a/app/services/run_service.py +++ b/app/services/run_service.py @@ -114,6 +114,12 @@ class RunService: task_actor_id = parsed.get("actor_id") task_recipe = parsed.get("recipe") task_inputs = parsed.get("inputs") + # Ensure inputs is a list (might be JSON string) + if isinstance(task_inputs, str): + try: + task_inputs = json.loads(task_inputs) + except json.JSONDecodeError: + task_inputs = None task_output_name = parsed.get("output_name") task_created_at = parsed.get("created_at") except json.JSONDecodeError: diff --git a/app/templates/recipes/detail.html b/app/templates/recipes/detail.html index 23255c8..c52b161 100644 --- a/app/templates/recipes/detail.html +++ b/app/templates/recipes/detail.html @@ -5,6 +5,8 @@ {% block head %} {{ super() }} + + {% endblock %} {% block content %} diff --git a/app/templates/runs/detail.html b/app/templates/runs/detail.html index f080606..99998e2 100644 --- a/app/templates/runs/detail.html +++ b/app/templates/runs/detail.html @@ -5,6 +5,8 @@ {% block head %} {{ super() }} + + {% endblock %} {% block content %}