Skip to content

Commit 6f6ebe2

Browse files
leos565claude
andcommitted
Fix integrity status in dropdown: read d.files.length and ok_count
/api/integrity returns {files: [...], ok_count, tampered_count} — not baseline_files or file_count. Now shows "On · N/M ok" (e.g. "On · 5/6 ok"). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ef3c007 commit 6f6ebe2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

deploy/dashboard/templates/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,8 +2691,10 @@ <h2 id="modalTitle" style="font-size: 16px; font-weight: 600;">Add Custom Rule</
26912691
if (intRes.status === 'fulfilled') {
26922692
const d = intRes.value;
26932693
const on = d.enabled !== false;
2694-
const files = d.baseline_files ?? d.file_count ?? '—';
2695-
setModuleVal('statusIntegrityVal', on ? `On · ${files} files` : 'Off', on);
2694+
const ok = d.ok_count ?? 0;
2695+
const total = d.files?.length ?? '—';
2696+
const files = typeof total === 'number' ? `${ok}/${total} ok` : total;
2697+
setModuleVal('statusIntegrityVal', on ? `On · ${files}` : 'Off', on);
26962698
} else { setModuleVal('statusIntegrityVal', 'unavailable', false); }
26972699

26982700
} catch (_) { /* best-effort */ }

0 commit comments

Comments
 (0)