document.getElementById('folderTree').addEventListener('click', async (event) => { const item = event.target.closest('[data-workflow-id]'); if (!item) return; const workflowId = item.dataset.workflowId; const res = await fetch(`/api/n8n/workflows/${workflowId}/executions`); document.getElementById('executionList').innerHTML = res.ok ? await res.text() : '実行履歴取得に失敗しました'; document.getElementById('executionDetail').innerHTML = '

実行を選択してください

'; }); document.getElementById('executionList').addEventListener('click', async (event) => { const row = event.target.closest('[data-execution-id]'); if (!row) return; const executionId = row.dataset.executionId; const res = await fetch(`/api/n8n/executions/${executionId}`); document.getElementById('executionDetail').innerHTML = res.ok ? await res.text() : '実行詳細取得に失敗しました'; });