fix(#fastRecord): 프론트엔드 API 호출 경로를 /api/pointbuilder/points로 수정

This commit is contained in:
windpacer
2026-04-29 17:34:03 +09:00
parent 0ec94946f2
commit 86dd268dab

View File

@@ -2049,10 +2049,14 @@ function fmtVal(v) {
} }
// ═══════════════════════════════════════════════════════════════ // ═══════════════════════════════════════════════════════════════
// fastRecord — 변수 // fastRecord — 변수 / 모달 헬퍼
// ═══════════════════════════════════════════════════════════════ // ═══════════════════════════════════════════════════════════════
let fastCurrentSessionId = null; let fastCurrentSessionId = null;
let fastChart = null; let fastChart = null;
function fastModalClose() {
document.getElementById('modal-fast-new').style.display = 'none';
}
let fastLivePollTimer = null; let fastLivePollTimer = null;
// ═══════════════════════════════════════════════════════════════ // ═══════════════════════════════════════════════════════════════
@@ -2122,7 +2126,7 @@ async function fastStart() {
} }
const data = await res.json(); const data = await res.json();
bootstrap.Modal.getInstance(document.getElementById('modal-fast-new'))?.hide(); fastModalClose();
await fastSessionsLoad(); await fastSessionsLoad();
fastSelect(data.id); fastSelect(data.id);
} }
@@ -2325,22 +2329,34 @@ function fastTagColor(tag, idx) {
// fastRecord — 이벤트 리스너 // fastRecord — 이벤트 리스너
// ═══════════════════════════════════════════════════════════════ // ═══════════════════════════════════════════════════════════════
document.getElementById('btn-fast-new')?.addEventListener('click', () => { document.getElementById('btn-fast-new')?.addEventListener('click', async () => {
// 태그 목록 로드 (기존 전역 변수명 tagNames 가정 — 다르면 수정 필요) const select = document.getElementById('fast-tag-select');
const select = document.getElementById('fast-tag-select'); select.innerHTML = '<option disabled>로딩 중...</option>';
select.innerHTML = ''; document.getElementById('fast-session-name').value = '';
(typeof tagNames !== 'undefined' ? tagNames : []).forEach(name => { document.getElementById('fast-retention-days').value = '';
const opt = document.createElement('option'); document.getElementById('modal-fast-new').style.display = '';
opt.value = name;
opt.textContent = name; try {
select.appendChild(opt); const res = await fetch('/api/pointbuilder/points');
}); if (res.ok) {
document.getElementById('fast-session-name').value = ''; const data = await res.json();
document.getElementById('fast-retention-days').value = ''; select.innerHTML = '';
new bootstrap.Modal(document.getElementById('modal-fast-new')).show(); (data.items || []).forEach(p => {
const opt = document.createElement('option');
opt.value = p.tagName || p.TagName;
opt.textContent = p.tagName || p.TagName;
select.appendChild(opt);
});
} else {
select.innerHTML = '<option disabled>태그 목록 로드 실패</option>';
}
} catch (e) {
console.error('[fast] 태그 목록 로드 실패:', e);
select.innerHTML = '<option disabled>태그 목록 로드 실패</option>';
}
}); });
document.getElementById('btn-fast-start')?.addEventListener('click', fastStart); // btn-fast-start: onclick="fastStart()" 으로 HTML에서 직접 처리
document.getElementById('btn-fast-stop')?.addEventListener('click', () => { document.getElementById('btn-fast-stop')?.addEventListener('click', () => {
if (fastCurrentSessionId) fastStop(fastCurrentSessionId); if (fastCurrentSessionId) fastStop(fastCurrentSessionId);