Diff -- /var/www/vhosts/3dshawn.com/site1/TEMPLATES/file_monitors.html
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
to e6e170ed5c23
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.| 1 | 1 | <div class="page-head"> |
| 2 | 2 | <span class="page-eyebrow"><span class="dot"></span> Configure</span> |
| 3 | 3 | <h1 class="page-title">File monitors</h1> |
| 4 | 4 | <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> |
| 5 | 5 | </div> |
| 6 | 6 | |
| 7 | 7 | <div class="module glow-teal" style="margin-bottom:16px"> |
| 8 | 8 | <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> |
| 9 | 9 | <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"> | |
| 11 | 11 | <input type="hidden" name="save" value="1"> |
| 12 | 12 | <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> |
| 13 | 13 | <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> | |
| 15 | 16 | <button type="submit" class="btn">Add scan</button> |
| 16 | 17 | </form> |
| 17 | 18 | </div> |
| 18 | 19 | </div> |
| 19 | 20 | |
| 20 | 21 | <div class="module glow-teal"> |
| 21 | 22 | <div class="module-head"><div class="left"><div class="module-title">Configured scans</div><span class="module-subtitle">$total configured.</span></div></div> |
| 22 | 23 | <div class="module-body tight"> |
| 23 | 24 | [if:$has_rows] |
| 24 | 25 | <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> | |
| 26 | 27 | <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] | |
| 28 | 47 | </tbody> |
| 29 | 48 | </table> |
| 30 | 49 | [/if] |
| 31 | 50 | [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] |
| 32 | 51 | </div> |
| 33 | 52 | </div> |