#pragma once // Tabs / panels para dag_engine_ui: // - DAG List (lista todos los DAGs, double-click -> selecciona) // - DAG Detail (header + Run Now + recent runs como data_table) // - Run Detail (steps con duracion/status + stdout/stderr expandible) // // Todos usan data_table_cpp_viz (issue 0081). State persistente por tab. #include "data_http.h" #include #include namespace dag_ui_tabs { // Estado global cross-tab: que DAG/run esta seleccionado actualmente. struct Selection { std::string dag_name; // "" = nada seleccionado std::string run_id; // "" = nada seleccionado }; Selection& selection(); // Cache: detalle actual del DAG seleccionado + del run seleccionado. // Se rellena bajo demanda al cambiar la seleccion (o boton Refresh). struct Caches { dag_ui::DagDetail dag_detail; dag_ui::DagRunDetail run_detail; bool dag_detail_loaded = false; bool run_detail_loaded = false; }; Caches& caches(); // Render cada tab. api_url es el endpoint dag_engine. // `live_runs` es el cache global mantenido por WS (sirve para DAG List status). void draw_dag_list(const std::string& api_url, const std::vector& dags, const std::vector& live_runs); void draw_dag_detail(const std::string& api_url); void draw_run_detail(const std::string& api_url); // Timeline panel: scatter X=time, Y=DAG name, color por status. // `runs_all` es el cache global de las ultimas N runs (mantenido por main.cpp). void draw_timeline(const std::string& api_url, const std::vector& runs_all); } // namespace dag_ui_tabs