feat(webui): run details show inputs, outputs and workflow.call links both ways
This commit is contained in:
13 files changed
+167
-91
No files matched your search
@@ -189,7 +189,7 @@ func (q *Queries) LatestStageResults(ctx context.Context, arg LatestStageResults
|
||||
}
|
||||
|
||||
const listStepExecutions = `-- name: ListStepExecutions :many
|
||||
SELECT id, execution_id, attempt, parent_id, depth, kind, name, status, detail, tokens_used, started_at, finished_at
|
||||
SELECT id, execution_id, attempt, parent_id, depth, kind, name, status, detail, tokens_used, started_at, finished_at, called_execution_id
|
||||
FROM step_executions
|
||||
WHERE execution_id = $1::bigint AND ($2::bigint = 0 OR attempt = $2::bigint)
|
||||
ORDER BY attempt, id
|
||||
@@ -201,18 +201,19 @@ type ListStepExecutionsParams struct {
|
||||
}
|
||||
|
||||
type ListStepExecutionsRow struct {
|
||||
ID int64
|
||||
ExecutionID int64
|
||||
Attempt int64
|
||||
ParentID pgtype.Int8
|
||||
Depth int32
|
||||
Kind string
|
||||
Name string
|
||||
Status string
|
||||
Detail string
|
||||
TokensUsed int64
|
||||
StartedAt pgtype.Timestamptz
|
||||
FinishedAt pgtype.Timestamptz
|
||||
ID int64
|
||||
ExecutionID int64
|
||||
Attempt int64
|
||||
ParentID pgtype.Int8
|
||||
Depth int32
|
||||
Kind string
|
||||
Name string
|
||||
Status string
|
||||
Detail string
|
||||
TokensUsed int64
|
||||
StartedAt pgtype.Timestamptz
|
||||
FinishedAt pgtype.Timestamptz
|
||||
CalledExecutionID int64
|
||||
}
|
||||
|
||||
// attempt = 0 lists every attempt of the execution, oldest first; the index
|
||||
@@ -240,6 +241,7 @@ func (q *Queries) ListStepExecutions(ctx context.Context, arg ListStepExecutions
|
||||
&i.TokensUsed,
|
||||
&i.StartedAt,
|
||||
&i.FinishedAt,
|
||||
&i.CalledExecutionID,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ RETURNING id, name;
|
||||
-- attempt = 0 lists every attempt of the execution, oldest first; the index
|
||||
-- (execution_id, attempt, id) makes both this and the single-attempt form a
|
||||
-- straight index scan.
|
||||
SELECT id, execution_id, attempt, parent_id, depth, kind, name, status, detail, tokens_used, started_at, finished_at
|
||||
SELECT id, execution_id, attempt, parent_id, depth, kind, name, status, detail, tokens_used, started_at, finished_at, called_execution_id
|
||||
FROM step_executions
|
||||
WHERE execution_id = @execution_id::bigint AND (@attempt::bigint = 0 OR attempt = @attempt::bigint)
|
||||
ORDER BY attempt, id;
|
||||
|
||||
@@ -258,6 +258,7 @@ func (s *Store) ListSteps(ctx context.Context, executionID int64, attempt int) (
|
||||
Kind: r.Kind, Name: r.Name, Status: taskstate.StepStatus(r.Status),
|
||||
Detail: r.Detail, TokensUsed: r.TokensUsed,
|
||||
StartedAt: r.StartedAt.Time, FinishedAt: r.FinishedAt.Time,
|
||||
CalledExecutionID: r.CalledExecutionID,
|
||||
}
|
||||
}
|
||||
return steps, nil
|
||||
|
||||
Reference in new issue
Block a user