Diff -- /var/www/vhosts/3dshawn.com/site1/TEMPLATES/settings.html
Diff
/var/www/vhosts/3dshawn.com/site1/TEMPLATES/settings.html
modified on local at 2026-07-12 00:35:30
Added
+8
lines
Removed
-0
lines
Context
101
unchanged
Blobs
from 7f92daebf65c
to cec92d338ed6
to cec92d338ed6
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">Settings</h1> |
| 4 | 4 | <p class="page-subtitle">Installation-level configuration. Read from <code>/etc/drift_sense/drift_sense.conf</code> -- edit that file to change values, then restart the daemons.</p> |
| 5 | </div> | |
| 6 | ||
| 7 | <div class="ds-guide"> | |
| 8 | <div class="dsg-icon">i</div> | |
| 9 | <div> | |
| 10 | <span class="dsg-title">What's live-editable vs static:</span> | |
| 11 | The <strong>global scan settings</strong> below (ignore list, file-type filter, max size) are DB-backed and take effect on the very next scanner tick — no daemon restart needed. Global ignore patterns are <strong>UNION'd</strong> <span class="ds-help" data-help-title="UNION vs override" data-help-body="For ignore patterns: both global and per-monitor lists apply, so if global says <code>*.log</code> and a monitor says <code>tmp/</code>, both are excluded. For file-type filter: per-monitor wins if set (empty = fall back to global). For max file size: per-monitor wins if set."></span> with each monitor's own list. Anything under <em>Resolved configuration</em> requires editing the conf file. | |
| 12 | </div> | |
| 5 | 13 | </div> |
| 6 | 14 | |
| 7 | 15 | <div class="dash-grid" style="grid-template-columns:repeat(3,1fr);margin-bottom:16px"> |
| 8 | 16 | <div class="module glow-teal"> |
| 9 | 17 | <div class="module-head"><div class="left"><div class="module-title">BLOB_STORE size</div><span class="module-subtitle">Unique content states.</span></div></div> |
| 10 | 18 | <div class="module-body kpi kpi-teal"><div class="num">$blob_ct</div><div class="lbl">unique blobs</div></div> |
| 11 | 19 | </div> |
| 12 | 20 | <div class="module glow-emerald"> |
| 13 | 21 | <div class="module-head"><div class="left"><div class="module-title">Compression ratio</div><span class="module-subtitle">Uncompressed vs on-disk.</span></div></div> |
| 14 | 22 | <div class="module-body kpi kpi-emerald"><div class="num">$ratio</div><div class="lbl">savings</div></div> |
| 15 | 23 | </div> |
| 16 | 24 | <div class="module glow-sky"> |
| 17 | 25 | <div class="module-head"><div class="left"><div class="module-title">Dedup references</div><span class="module-subtitle">How many FILE_CHANGES rows point at BLOB_STORE.</span></div></div> |
| 18 | 26 | <div class="module-body kpi kpi-sky"><div class="num">$total_refs</div><div class="lbl">references</div></div> |
| 19 | 27 | </div> |
| 20 | 28 | </div> |
| 21 | 29 | |
| 22 | 30 | <div class="dash-grid" style="grid-template-columns:1fr 1fr;margin-bottom:16px"> |
| 23 | 31 | <div class="module glow-sky"> |
| 24 | 32 | <div class="module-head"><div class="left"> |
| 25 | 33 | <div class="module-title">Auto-purge plan (30d)</div> |
| 26 | 34 | <span class="module-subtitle">Dry-run runs daily at 03:15 — <a href="/purge_log.cgi" style="color:var(--accent-hi)">full log</a></span> |
| 27 | 35 | </div></div> |
| 28 | 36 | <div class="module-body kpi kpi-sky"> |
| 29 | 37 | <div class="num">$purge_dry_ct</div> |
| 30 | 38 | <div class="lbl">blobs would be freed</div> |
| 31 | 39 | <div class="sub"><strong>$purge_dry_bytes</strong> reclaimable · last run <span class="ts" data-ts="$last_purge_epoch" data-fmt="relative">$last_purge_h</span></div> |
| 32 | 40 | </div> |
| 33 | 41 | </div> |
| 34 | 42 | <div class="module glow-amber"> |
| 35 | 43 | <div class="module-head"><div class="left"> |
| 36 | 44 | <div class="module-title">Live purges (30d)</div> |
| 37 | 45 | <span class="module-subtitle">Actual disk reclaimed once live mode is on.</span> |
| 38 | 46 | </div></div> |
| 39 | 47 | <div class="module-body kpi kpi-amber"> |
| 40 | 48 | <div class="num">$purge_live_ct</div> |
| 41 | 49 | <div class="lbl">blobs deleted</div> |
| 42 | 50 | <div class="sub"><strong>$purge_live_bytes</strong> reclaimed</div> |
| 43 | 51 | </div> |
| 44 | 52 | </div> |
| 45 | 53 | </div> |
| 46 | 54 | |
| 47 | 55 | [if:$saved] |
| 48 | 56 | <div class="banner banner-ok" style="margin:0 0 16px;padding:10px 14px;border-radius:10px;background:rgba(52,211,153,.10);border:1px solid rgba(52,211,153,.35);color:#a7f3d0;font-size:13px"> |
| 49 | 57 | Global scan settings saved. Applies to the very next scanner tick. |
| 50 | 58 | </div> |
| 51 | 59 | [/if] |
| 52 | 60 | |
| 53 | 61 | <div class="module glow-amber" style="margin-bottom:16px"> |
| 54 | 62 | <div class="module-head"><div class="left"> |
| 55 | 63 | <div class="module-icon"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg></div> |
| 56 | 64 | <div class="module-title">Global scan settings</div> |
| 57 | 65 | <span class="module-subtitle">Applied to every monitor -- portfolio-wide. Ignore patterns are UNION'd with each monitor's own list. File-type filter is used only when a monitor's own filter is empty.</span> |
| 58 | 66 | </div></div> |
| 59 | 67 | <div class="module-body"> |
| 60 | 68 | <form method="post" action="/settings.cgi" style="display:flex;flex-direction:column;gap:14px"> |
| 61 | 69 | <input type="hidden" name="save_globals" value="1"> |
| 62 | 70 | |
| 63 | 71 | <label style="display:flex;flex-direction:column;gap:4px"> |
| 64 | 72 | <span class="rb-label">Global ignore patterns |
| 65 | 73 | <span class="dim" style="text-transform:none;letter-spacing:0;font-size:10.5px">— one per line OR comma-separated. Glob wildcards <code>*</code>, <code>?</code>, and <code>**</code> supported.</span> |
| 66 | 74 | </span> |
| 67 | 75 | <textarea name="global_ignore_list" rows="10" placeholder="*.swp *.tmp *.bak node_modules/* .git/* logs/*" |
| 68 | 76 | style="background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.6;resize:vertical">$global_ignore_pretty</textarea> |
| 69 | 77 | </label> |
| 70 | 78 | |
| 71 | 79 | <div style="display:flex;gap:12px"> |
| 72 | 80 | <label style="flex:2;display:flex;flex-direction:column;gap:4px"> |
| 73 | 81 | <span class="rb-label">Global file-type filter <span class="dim" style="text-transform:none;letter-spacing:0;font-size:10.5px">(blank = all types)</span></span> |
| 74 | 82 | <input type="text" name="global_file_type_filter" value="$global_file_type_filter" placeholder="pl,pm,cgi,html,css,js,sql,conf,md" |
| 75 | 83 | style="background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 12px;font-family:var(--mono);font-size:12px"> |
| 76 | 84 | </label> |
| 77 | 85 | <label style="flex:1;display:flex;flex-direction:column;gap:4px"> |
| 78 | 86 | <span class="rb-label">Global max file size (bytes)</span> |
| 79 | 87 | <input type="number" name="global_max_file_size_bytes" value="$global_max_file_size_bytes" min="0" |
| 80 | 88 | style="background:var(--bg-1);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 12px"> |
| 81 | 89 | </label> |
| 82 | 90 | </div> |
| 83 | 91 | |
| 84 | 92 | <div style="display:flex;justify-content:flex-end"> |
| 85 | 93 | <button type="submit" class="tr-chip is-active" style="border:none;padding:8px 18px">Save globals</button> |
| 86 | 94 | </div> |
| 87 | 95 | </form> |
| 88 | 96 | </div> |
| 89 | 97 | </div> |
| 90 | 98 | |
| 91 | 99 | <div class="module glow-teal"> |
| 92 | 100 | <div class="module-head"><div class="left"><div class="module-title">Resolved configuration</div><span class="module-subtitle">Merged from conf file + code defaults. Secrets redacted.</span></div></div> |
| 93 | 101 | <div class="module-body tight"> |
| 94 | 102 | <table class="tbl"> |
| 95 | 103 | <thead><tr><th style="width:260px">Key</th><th>Value</th></tr></thead> |
| 96 | 104 | <tbody> |
| 97 | 105 | [loop:@cfg_rows]<tr><td class="mono"><strong>$key</strong></td><td class="mono dim">$value</td></tr>[/loop] |
| 98 | 106 | </tbody> |
| 99 | 107 | </table> |
| 100 | 108 | </div> |
| 101 | 109 | </div> |