n8n 連携: 作業区間を選んで送る「n8n へ送る」タブを追加
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -144,6 +144,7 @@ async function selectProject(id) {
|
||||
$('#session-table tbody').innerHTML = '<tr><td class="loading">解析中…</td></tr>';
|
||||
if (state.view === 'daily') loadDaily();
|
||||
else if (state.view === 'gantt') loadGantt();
|
||||
else if (state.view === 'n8n') loadN8n();
|
||||
await reloadSessions();
|
||||
}
|
||||
|
||||
@@ -317,6 +318,7 @@ function syncTabs() {
|
||||
$('#tab-turns').classList.toggle('sel', state.view === 'turns');
|
||||
$('#tab-daily').classList.toggle('sel', state.view === 'daily');
|
||||
$('#tab-gantt').classList.toggle('sel', state.view === 'gantt');
|
||||
$('#tab-n8n').classList.toggle('sel', state.view === 'n8n');
|
||||
}
|
||||
|
||||
function ganttQuery(extra) {
|
||||
@@ -343,6 +345,10 @@ function dailyQuery(extra) {
|
||||
|
||||
function updateCsv() {
|
||||
const link = $('#csv-turns');
|
||||
if (state.view === 'n8n') {
|
||||
link.removeAttribute('href');
|
||||
return;
|
||||
}
|
||||
if (state.view === 'daily') {
|
||||
link.href = '/api/daily?' + dailyQuery({ format: 'csv' });
|
||||
link.title = '日別集計を CSV 出力';
|
||||
@@ -363,6 +369,7 @@ function setView(view) {
|
||||
updateCsv();
|
||||
if (view === 'daily') loadDaily();
|
||||
else if (view === 'gantt') loadGantt();
|
||||
else if (view === 'n8n') loadN8n();
|
||||
else renderDetail();
|
||||
}
|
||||
|
||||
@@ -1021,6 +1028,7 @@ async function refreshFollow() {
|
||||
await reloadSessions();
|
||||
if (state.view === 'daily') await loadDaily({ silent: true });
|
||||
else if (state.view === 'gantt') await loadGantt({ silent: true });
|
||||
else if (state.view === 'n8n') { /* 編集中の入力を消さないよう、自動追従では読み直さない */ }
|
||||
else await reloadDetail();
|
||||
list.scrollTop = listTop;
|
||||
// やりとりを末尾まで見ていたら、追記された行に追従する (tail -f と同じ感覚)
|
||||
@@ -1472,6 +1480,7 @@ $('#relative').onchange = (e) => {
|
||||
$('#tab-turns').onclick = () => setView('turns');
|
||||
$('#tab-daily').onclick = () => setView('daily');
|
||||
$('#tab-gantt').onclick = () => setView('gantt');
|
||||
$('#tab-n8n').onclick = () => setView('n8n');
|
||||
$('#redmine').onclick = openRedmine;
|
||||
$('#rm-close').onclick = closeRedmine;
|
||||
$('#rm-run').onclick = runRedmine;
|
||||
@@ -1490,7 +1499,7 @@ $('#reload').onclick = async () => {
|
||||
|
||||
let resizeTimer = null;
|
||||
window.addEventListener('resize', () => {
|
||||
if (state.view === 'turns') return;
|
||||
if (state.view === 'turns' || state.view === 'n8n') return;
|
||||
clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout(() => {
|
||||
if (state.view === 'daily' && state.daily) renderDaily();
|
||||
|
||||
Reference in New Issue
Block a user