Diff -- /var/www/vhosts/3dshawn.com/site1/TEMPLATES/file_monitors.html

O Operator
Diff

/var/www/vhosts/3dshawn.com/site1/TEMPLATES/file_monitors.html

modified on local at 2026-07-12 00:19:37

Added
+23
lines
Removed
-4
lines
Context
29
unchanged
Blobs
from 7f08107dd104
to e6e170ed5c23
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
11<div class="page-head">
22 <span class="page-eyebrow"><span class="dot"></span> Configure</span>
33 <h1 class="page-title">File monitors</h1>
44 <p class="page-subtitle">Filesystem paths DriftSense should watch. Each scan is captured with SHA-256 content dedup + gzip compression -- history costs single-digit MB per repo per year even for actively-developed code.</p>
55</div>
66
77<div class="module glow-teal" style="margin-bottom:16px">
88 <div class="module-head"><div class="left"><div class="module-title">Add a scan target</div><span class="module-subtitle">Common presets: /var/www (web root), /etc (system configs), /etc/cron.d (scheduled jobs), /usr/local/etc (app configs)</span></div></div>
99 <div class="module-body">
10 <form method="post" action="/file_monitors.cgi" style="display:grid;grid-template-columns:1fr 2fr 1fr 120px;gap:10px;align-items:end">
10 <form method="post" action="/file_monitors.cgi" style="display:grid;grid-template-columns:1fr 2fr 1fr 130px 120px;gap:10px;align-items:end">
1111 <input type="hidden" name="save" value="1">
1212 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">Scan name</label><input type="text" name="scan_name" required placeholder="e.g. Web root"></div>
1313 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">Path</label><input type="text" name="scan_path" required placeholder="/var/www"></div>
14 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">File types</label><input type="text" name="file_type_filter" placeholder=".php,.pl,.conf (blank = all)"></div>
14 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">File types</label><input type="text" name="file_type_filter" placeholder=".php,.pl,.conf"></div>
15 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">Retention (days)</label><input type="number" name="retention_days" min="0" placeholder="blank = global"></div>
1516 <button type="submit" class="btn">Add scan</button>
1617 </form>
1718 </div>
1819</div>
1920
2021<div class="module glow-teal">
2122 <div class="module-head"><div class="left"><div class="module-title">Configured scans</div><span class="module-subtitle">$total configured.</span></div></div>
2223 <div class="module-body tight">
2324 [if:$has_rows]
2425 <table class="tbl">
25 <thead><tr><th style="width:60px">#</th><th>Name / Path</th><th>Ignore</th><th style="width:100px">Status</th><th style="width:150px">Last scanned</th></tr></thead>
26 <thead><tr><th style="width:60px">#</th><th>Name / Path</th><th>Ignore</th><th style="width:100px">Status</th><th style="width:120px">Retention</th><th style="width:150px">Last scanned</th></tr></thead>
2627 <tbody>
27 [loop:@rows]<tr><td class="mono dim">$id</td><td><strong>$scan_name</strong><div class="mono dim" style="font-size:11.5px">$scan_path</div></td><td class="mono dim" style="font-size:11.5px">$ignore_preview</td><td><span class="pill $status_pill">$status_lbl</span></td><td class="mono dim">$last_h</td></tr>[/loop]
28 [loop:@rows]
29 <tr>
30 <td class="mono dim">$id</td>
31 <td><strong>$scan_name</strong><div class="mono dim" style="font-size:11.5px">$scan_path</div></td>
32 <td class="mono dim" style="font-size:11.5px">$ignore_preview</td>
33 <td><span class="pill $status_pill">$status_lbl</span></td>
34 <td>
35 <form method="post" action="/file_monitors.cgi" style="display:flex;gap:4px;align-items:center">
36 <input type="hidden" name="update_retention" value="1">
37 <input type="hidden" name="mid" value="$id">
38 <input type="number" name="retention_days" value="$retention_days" min="0"
39 title="Blank / 0 = fall back to global retention_days"
40 style="width:60px;background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:3px 6px;font-size:11px">
41 <button type="submit" class="tr-chip" style="padding:2px 6px;font-size:10.5px">Save</button>
42 </form>
43 </td>
44 <td class="mono dim">$last_h</td>
45 </tr>
46 [/loop]
2847 </tbody>
2948 </table>
3049 [/if]
3150 [if:!$has_rows]<div style="padding:36px 14px;text-align:center;color:var(--text-dim)">No scans configured. Add one above to start capturing file changes.</div>[/if]
3251 </div>
3352</div>