feat(ui): enhance workflow logs display

This commit is contained in:
Fu Diwei
2025-03-19 10:09:30 +08:00
parent fd6e41c566
commit 882f802585
16 changed files with 168 additions and 69 deletions

View File

@@ -22,7 +22,7 @@ func (r *WorkflowLogRepository) ListByWorkflowRunId(ctx context.Context, workflo
records, err := app.GetApp().FindRecordsByFilter(
domain.CollectionNameWorkflowLog,
"runId={:runId}",
"-created",
"timestamp",
0, 0,
dbx.Params{"runId": workflowRunId},
)
@@ -66,6 +66,7 @@ func (r *WorkflowLogRepository) Save(ctx context.Context, workflowLog *domain.Wo
record.Set("runId", workflowLog.RunId)
record.Set("nodeId", workflowLog.NodeId)
record.Set("nodeName", workflowLog.NodeName)
record.Set("timestamp", workflowLog.Timestamp)
record.Set("level", workflowLog.Level)
record.Set("message", workflowLog.Message)
record.Set("data", workflowLog.Data)
@@ -102,6 +103,7 @@ func (r *WorkflowLogRepository) castRecordToModel(record *core.Record) (*domain.
RunId: record.GetString("runId"),
NodeId: record.GetString("nodeId"),
NodeName: record.GetString("nodeName"),
Timestamp: int64(record.GetInt("timestamp")),
Level: record.GetString("level"),
Message: record.GetString("message"),
Data: logdata,