From e8550dc5838d908f627b5d249e6a13de1e82279e Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 25 Jul 2026 20:27:44 +0900 Subject: [PATCH] feat(wbs-ux): inject 3 additional live operational features into SystemSettingsView (SignalR Socket Chip, DbUp Tag, Live Log Terminal) --- src/frontend/src/views/SystemSettingsView.vue | 112 ++++++++++++++---- 1 file changed, 88 insertions(+), 24 deletions(-) diff --git a/src/frontend/src/views/SystemSettingsView.vue b/src/frontend/src/views/SystemSettingsView.vue index 42ccc327..50ef3867 100644 --- a/src/frontend/src/views/SystemSettingsView.vue +++ b/src/frontend/src/views/SystemSettingsView.vue @@ -27,7 +27,7 @@ interface SettingItem { status: 'ACTIVE' | 'WARNING' | 'BLOCKED'; updated_at: string; note: string; - lock_version: number; // 낙관적 락 버전 + lock_version: number; attachments?: string[]; audit_history?: AuditLog[]; } @@ -41,11 +41,17 @@ const items = ref([]); const selectedItem = ref(null); const isEditMode = ref(false); -// 3. 현장감 텔레메트리 & 배치 프로그레스 상태 +// 3. 현장감 텔레메트리, 소켓, 로그 스트리밍 상태 const pingMs = ref(4); const isBatchRunning = ref(false); const batchProgress = ref(0); const dbConnections = ref(4); +const liveLogs = ref([ + '[14:00:01] [INFO] SignalR WebSocket Hub connected to wss://localhost:5173/hub', + '[14:00:05] [INFO] DbUp Migration schema verified (v2026.07.25_001)', + '[14:02:10] [INFO] Factor RSI calculated successfully (0.012s)', + '[14:02:15] [WARN] D2 Cash threshold check passed (500,000,000 KRW target)' +]); // 4. 페이지네이션 및 엑셀 드롭다운 상태 const currentPage = ref(1); @@ -135,12 +141,14 @@ const runFactorBatch = () => { if (isBatchRunning.value) return; isBatchRunning.value = true; batchProgress.value = 0; + liveLogs.value.unshift(`[${new Date().toLocaleTimeString()}] [EXEC] Triggered factor recalculation batch pipeline`); showToast('⚡ 팩터 재계산 비동기 배치 작업이 트리거되었습니다.', 'success'); const timer = setInterval(() => { batchProgress.value += 25; if (batchProgress.value >= 100) { clearInterval(timer); isBatchRunning.value = false; + liveLogs.value.unshift(`[${new Date().toLocaleTimeString()}] [SUCCESS] Batch pipeline finished in 1.2s`); showToast('✅ 팩터 재계산 배치가 성공적으로 완료되었습니다 (소요시간: 1.2s)', 'success'); } }, 300); @@ -175,6 +183,7 @@ const saveModalItem = () => { items.value.unshift({ ...modalItem.value }); selectedItem.value = { ...modalItem.value }; isModalOpen.value = false; + liveLogs.value.unshift(`[${new Date().toLocaleTimeString()}] [CREATE] Added new setting key: ${modalItem.value.setting_key}`); showToast('신규 설정 항목이 성공적으로 등록되었습니다.', 'success'); }; @@ -182,7 +191,7 @@ const saveDetailForm = () => { if (!selectedItem.value) return; const idx = items.value.findIndex(i => i.id === selectedItem.value?.id); if (idx !== -1) { - selectedItem.value.lock_version += 1; // 락 버전 증가 + selectedItem.value.lock_version += 1; if (!selectedItem.value.audit_history) selectedItem.value.audit_history = []; selectedItem.value.audit_history.unshift({ timestamp: new Date().toISOString().slice(0, 16).replace('T', ' '), @@ -191,6 +200,7 @@ const saveDetailForm = () => { }); items.value[idx] = JSON.parse(JSON.stringify(selectedItem.value)); isEditMode.value = false; + liveLogs.value.unshift(`[${new Date().toLocaleTimeString()}] [UPDATE] Key '${selectedItem.value.setting_key}' saved (Ver v${selectedItem.value.lock_version})`); showToast(`PostgreSQL 원장 설정 변경사항이 저장되었습니다 (Lock Ver: v${selectedItem.value.lock_version}).`, 'success'); } }; @@ -198,6 +208,7 @@ const saveDetailForm = () => { const deleteSelectedItem = () => { if (!selectedItem.value) return; if (confirm(`[${selectedItem.value.setting_key}] 항목을 삭제하시겠습니까?`)) { + liveLogs.value.unshift(`[${new Date().toLocaleTimeString()}] [DELETE] Deleted key: ${selectedItem.value.setting_key}`); items.value = items.value.filter(i => i.id !== selectedItem.value?.id); selectedItem.value = items.value.length > 0 ? items.value[0] : null; showToast('항목이 성공적으로 삭제되었습니다.', 'warning'); @@ -206,6 +217,7 @@ const deleteSelectedItem = () => { const triggerExport = (fmt: string) => { showExportMenu.value = false; + liveLogs.value.unshift(`[${new Date().toLocaleTimeString()}] [EXPORT] Exporting data stream as ${fmt}`); showToast(`${fmt} 형식으로 대용량 스트리밍 내보내기를 시작합니다.`, 'success'); }; @@ -229,16 +241,18 @@ onMounted(loadData);

⚙️ SCR-07: 현장감 퀀트 CRUD 매니저

- 🟢 PostgreSQL Live ({{ pingMs }}ms) + 🟢 Live ({{ pingMs }}ms) + 📡 SignalR Connected
- Master-Detail, AG Grid, Batch Progress, Lock Guard, Telemetry, Toast, 더존 컴포넌트 + Master-Detail, AG Grid, Batch Progress, Lock Guard, Telemetry, Log Terminal, 더존 컴포넌트
+ 🛡️ DbUp: v2026.07.25 - + @@ -374,6 +388,16 @@ onMounted(loadData);
+ +
+
💻 실시간 퀀트 엔진 로그 터미널
+
+
+ {{ log }} +
+
+
+
🕒 변경 감사 이력 타임라인 (Audit Trail)
@@ -430,31 +454,33 @@ onMounted(loadData);
- +