ken_nogi/NodeSrv/apps/app-portal/public/n8n.js
Kenichiro NOGI eca5c84c39 feat(app-portal): n8nワークフローのフォルダ構造・実行ログ閲覧ページを追加
n8nのフォルダ/ワークフロー構成をそのままapp-portal(/n8n)に反映し、
Webhookトリガーに限らず任意のワークフローの実行履歴・ノード単位の
成功/失敗・エラー内容を確認できるようにした(get-voice-mail専用にせず
n8n Public API経由で動的取得する汎用設計)。TDDで実装、テスト23件追加。
2026-09-19 12:19:27 +09:00

17 lines
943 B
JavaScript

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 = '<p class="text-muted">実行を選択してください</p>';
});
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() : '実行詳細取得に失敗しました';
});