Add execution cleanup functionality

Changes:
- Added DELETE /api/executions/:id endpoint
- Added "Clear Completed" button to Executions tab
- Deletes all completed and failed executions
- Broadcasts execution_deleted event to update all clients
- Shows count of deleted executions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-07 22:36:51 -05:00
parent e13fe9d22f
commit 7656f4a151
2 changed files with 40 additions and 3 deletions

View File

@@ -418,6 +418,16 @@ app.get('/api/executions', authenticateSSO, async (req, res) => {
}
});
app.delete('/api/executions/:id', authenticateSSO, async (req, res) => {
try {
await pool.query('DELETE FROM executions WHERE id = ?', [req.params.id]);
broadcast({ type: 'execution_deleted', execution_id: req.params.id });
res.json({ success: true });
} catch (error) {
res.status(500).json({ error: error.message });
}
});
// Health check (no auth required)
app.get('/health', async (req, res) => {
try {