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:
10
server.js
10
server.js
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user