diff --git a/apps/dag_engine/executor.go b/apps/dag_engine/executor.go index 44fd9ee9..a14a90ec 100644 --- a/apps/dag_engine/executor.go +++ b/apps/dag_engine/executor.go @@ -326,14 +326,15 @@ func generateID() string { // DagInfo summarizes a DAG file for listing. type DagInfo struct { - Name string `json:"name"` - Description string `json:"description,omitempty"` - Schedule []string `json:"schedule,omitempty"` - Tags []string `json:"tags,omitempty"` - Type string `json:"type,omitempty"` - FilePath string `json:"file_path"` - Valid bool `json:"valid"` - LastRun *store.DagRun `json:"last_run,omitempty"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Schedule []string `json:"schedule,omitempty"` + Tags []string `json:"tags,omitempty"` + Type string `json:"type,omitempty"` + FilePath string `json:"file_path"` + Valid bool `json:"valid"` + LastRun *store.DagRun `json:"last_run,omitempty"` + LastRuns []store.DagRun `json:"last_runs,omitempty"` // 5 mas recientes (mas reciente primero) } // ListDAGs scans a directory for YAML files and returns parsed DAG info. @@ -379,10 +380,11 @@ func (e *Executor) ListDAGs() ([]DagInfo, error) { Valid: true, } - // Attach last run info. - runs, _, _ := e.store.ListRuns(dag.Name, 1, 0) + // Attach last 5 runs (most recent first). + runs, _, _ := e.store.ListRuns(dag.Name, 5, 0) if len(runs) > 0 { info.LastRun = &runs[0] + info.LastRuns = runs } dags = append(dags, info) diff --git a/cpp/apps/dag_engine_ui b/cpp/apps/dag_engine_ui index 7c7923ac..49fc908f 160000 --- a/cpp/apps/dag_engine_ui +++ b/cpp/apps/dag_engine_ui @@ -1 +1 @@ -Subproject commit 7c7923ac6a2d15a86257f6ca9ec7c0b1ecadbac9 +Subproject commit 49fc908fb4d07361f63715de800a1a4044851b4e