Executions list: show what a command ran and on which worker (#15)
CI / Test (jest) (pull_request) Successful in 27s
CI / Lint (eslint) (pull_request) Successful in 31s
CI / Security (npm audit) (pull_request) Successful in 11s
CI / Integration (api) (pull_request) Canceled after 1m56s
CI / Scan (secrets, workflows, shell) (pull_request) Canceled after 1m48s
CI / UI (playwright) (pull_request) Canceled after 0s
CI / UI screenshots (before/after) (pull_request) Canceled after 0s
CI / Deploy (pull_request) Canceled after 0s
CI / Deploy worker (pull_request) Canceled after 0s
CI / Notify (pull_request) Canceled after 0s
CI / Test (jest) (pull_request) Successful in 27s
CI / Lint (eslint) (pull_request) Successful in 31s
CI / Security (npm audit) (pull_request) Successful in 11s
CI / Integration (api) (pull_request) Canceled after 1m56s
CI / Scan (secrets, workflows, shell) (pull_request) Canceled after 1m48s
CI / UI (playwright) (pull_request) Canceled after 0s
CI / UI screenshots (before/after) (pull_request) Canceled after 0s
CI / Deploy (pull_request) Canceled after 0s
CI / Deploy worker (pull_request) Canceled after 0s
CI / Notify (pull_request) Canceled after 0s
Every command execution was listed as "[Quick Command]". The list API now returns, for command executions, the first command (up to 120 characters) and the worker's name (from the first log entry, joined to workers), and the row shows them as `command @ worker`. Workflows keep their name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a945cd80d3
commit
eda319e16a
5 files changed
+37
-2
No files matched your search
@@ -1695,9 +1695,13 @@ app.get('/api/executions', authenticateSSO, async (req, res) => {
|
||||
|
||||
const [rows] = await pool.query(
|
||||
`SELECT e.id, e.workflow_id, e.status, e.started_by, e.started_at, e.completed_at,
|
||||
w.name as workflow_name
|
||||
w.name as workflow_name,
|
||||
-- What a command execution ran, and where (#15): its first log entry.
|
||||
IF(e.workflow_id IS NULL, LEFT(JSON_UNQUOTE(JSON_EXTRACT(e.logs, '$[0].command')), 120), NULL) AS command,
|
||||
IF(e.workflow_id IS NULL, wk.name, NULL) AS worker_name
|
||||
FROM executions e
|
||||
LEFT JOIN workflows w ON e.workflow_id = w.id
|
||||
LEFT JOIN workers wk ON e.workflow_id IS NULL AND wk.id = JSON_UNQUOTE(JSON_EXTRACT(e.logs, '$[0].worker_id'))
|
||||
${whereClause}
|
||||
ORDER BY e.started_at DESC LIMIT ? OFFSET ?`,
|
||||
[...queryParams, limit, offset]
|
||||
|
||||
Reference in new issue
Block a user