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

O Operator
Diff

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

added on local at 2026-07-10 18:57:31

Added
+40
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to ab6f700dec6d
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
1<div class="page-head">
2 <span class="page-eyebrow"><span class="dot"></span> Configure</span>
3 <h1 class="page-title">Databases</h1>
4 <p class="page-subtitle">Every database DriftSense should watch for schema changes. Add a row and the schema monitor will pick it up on next tick.</p>
5</div>
6
7<div class="module glow-teal" style="margin-bottom:16px">
8 <div class="module-head"><div class="left">
9 <div class="module-icon"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.7-4 3-9 3s-9-1.3-9-3"/></svg></div>
10 <div class="module-title">Add a database to monitor</div>
11 <span class="module-subtitle">Credentials are stored on this host only. Schema monitor uses them to run <code>SHOW CREATE TABLE</code> and diff DDL across ticks.</span>
12 </div></div>
13 <div class="module-body">
14 <form method="post" action="/databases.cgi" style="display:grid;grid-template-columns:repeat(4,1fr) 120px;gap:10px;align-items:end">
15 <input type="hidden" name="save" value="1">
16 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">DB name</label><input type="text" name="db_name" required></div>
17 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">Host</label><input type="text" name="hostname" value="localhost"></div>
18 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">User</label><input type="text" name="username" required></div>
19 <div><label class="dim" style="display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:700;margin-bottom:5px">Password</label><input type="password" name="password"></div>
20 <button type="submit" class="btn">Add</button>
21 </form>
22 </div>
23</div>
24
25<div class="module glow-teal">
26 <div class="module-head"><div class="left"><div class="module-title">Monitored databases</div><span class="module-subtitle">$total configured.</span></div></div>
27 <div class="module-body tight">
28 [if:$has_rows]
29 <table class="tbl">
30 <thead><tr><th style="width:60px">#</th><th>Database</th><th style="width:150px">Host:Port</th><th style="width:100px">Status</th><th style="width:110px">Connection</th><th style="width:150px">Last connected</th></tr></thead>
31 <tbody>
32 [loop:@rows]
33 <tr><td class="mono dim">$id</td><td class="mono"><strong>$db_name</strong> <span class="dim">$username</span></td><td class="mono dim">$hostname:$port</td><td><span class="pill $status_pill">$status_lbl</span></td><td><span class="pill $conn_pill">$conn_lbl</span></td><td class="mono dim">$last_h</td></tr>
34 [/loop]
35 </tbody>
36 </table>
37 [/if]
38 [if:!$has_rows]<div style="padding:36px 14px;text-align:center;color:var(--text-dim)">No databases configured yet. Add one above to start capturing schema changes.</div>[/if]
39 </div>
40</div>