Diff -- /var/www/vhosts/3dshawn.com/site1/TEMPLATES/restore_release.html
Diff
/var/www/vhosts/3dshawn.com/site1/TEMPLATES/restore_release.html
added on local at 2026-07-12 00:19:39
Added
+95
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to b04cc202dc75
to b04cc202dc75
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> Restore</span> | |
| 3 | <h1 class="page-title">Restore release «$release_name»</h1> | |
| 4 | <p class="page-subtitle">$release_desc <span class="dim">— captured $released_h by $released_by</span></p> | |
| 5 | </div> | |
| 6 | ||
| 7 | [if:$has_error] | |
| 8 | <div class="module glow-rose"><div class="module-body">$error_msg</div></div> | |
| 9 | [/if] | |
| 10 | ||
| 11 | [if:$has_result] | |
| 12 | <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"> | |
| 13 | Batch restore complete: <strong>$ok_ct</strong> succeeded, <strong>$fail_ct</strong> failed, <strong>$skipped_ct</strong> skipped (missing blob). See <a href="/file_changes.cgi" style="color:var(--accent-hi)">file changes</a> or RESTORE_LOG for detail. | |
| 14 | </div> | |
| 15 | [/if] | |
| 16 | ||
| 17 | [if:$has_pins] | |
| 18 | <div class="dash-grid" style="grid-template-columns:1fr 1fr 1fr;margin-bottom:16px"> | |
| 19 | <div class="module glow-teal"> | |
| 20 | <div class="module-body kpi kpi-teal"> | |
| 21 | <div class="num">$total_pins</div> | |
| 22 | <div class="lbl">total pins</div> | |
| 23 | <div class="sub">In this release</div> | |
| 24 | </div> | |
| 25 | </div> | |
| 26 | <div class="module glow-emerald"> | |
| 27 | <div class="module-body kpi kpi-emerald"> | |
| 28 | <div class="num">$in_sync_ct</div> | |
| 29 | <div class="lbl">in sync</div> | |
| 30 | <div class="sub">Current SHA matches pinned</div> | |
| 31 | </div> | |
| 32 | </div> | |
| 33 | <div class="module glow-amber"> | |
| 34 | <div class="module-body kpi kpi-amber"> | |
| 35 | <div class="num">$drift_ct</div> | |
| 36 | <div class="lbl">drifted</div> | |
| 37 | <div class="sub">Restore would rewrite these</div> | |
| 38 | </div> | |
| 39 | </div> | |
| 40 | </div> | |
| 41 | ||
| 42 | <div class="module glow-sky"> | |
| 43 | <div class="module-head"><div class="left"> | |
| 44 | <div class="module-title">Pinned files</div> | |
| 45 | <span class="module-subtitle">"drifted" rows will be overwritten to match the pinned SHA. Each target gets its current content backed up to <code><target>.drift_restore_backup_<epoch></code> before overwrite.</span> | |
| 46 | </div></div> | |
| 47 | <div class="module-body tight" style="max-height:520px;overflow:auto"> | |
| 48 | <table class="tbl"> | |
| 49 | <thead><tr> | |
| 50 | <th style="width:80px">Status</th> | |
| 51 | <th>File</th> | |
| 52 | <th style="width:120px">Server</th> | |
| 53 | <th style="width:110px">Pinned SHA</th> | |
| 54 | <th style="width:110px">Current SHA</th> | |
| 55 | </tr></thead> | |
| 56 | <tbody> | |
| 57 | [loop:@pins] | |
| 58 | <tr> | |
| 59 | <td><span class="pill $status_pill">$status_lbl</span></td> | |
| 60 | <td class="mono" style="font-size:11.5px"><a href="$diff_url" style="color:var(--accent-hi);text-decoration:none">$file_short</a></td> | |
| 61 | <td class="dim">$server_name <span class="dim" style="font-size:10.5px">($server_kind)</span></td> | |
| 62 | <td class="mono dim">$pinned_short</td> | |
| 63 | <td class="mono dim">$current_short</td> | |
| 64 | </tr> | |
| 65 | [/loop] | |
| 66 | </tbody> | |
| 67 | </table> | |
| 68 | </div> | |
| 69 | </div> | |
| 70 | ||
| 71 | <div class="module glow-rose" style="margin-top:20px"> | |
| 72 | <div class="module-head"><div class="left"> | |
| 73 | <div class="module-title">Confirm batch restore</div> | |
| 74 | <span class="module-subtitle">Restores $drift_ct drifted file(s). The $in_sync_ct in-sync file(s) will be a no-op. Every action goes to RESTORE_LOG.</span> | |
| 75 | </div></div> | |
| 76 | <div class="module-body"> | |
| 77 | <form method="post" action="/restore_release.cgi" style="display:flex;gap:12px;align-items:center"> | |
| 78 | <input type="hidden" name="release_id" value="$release_id"> | |
| 79 | <input type="hidden" name="confirm" value="1"> | |
| 80 | <button type="submit" class="tr-chip is-active" style="border:none;padding:8px 22px;background:var(--accent-danger);border-color:var(--accent-danger);color:#fff"> | |
| 81 | Yes, restore all $total_pins pinned files | |
| 82 | </button> | |
| 83 | <a href="/named_releases.cgi" class="tr-chip">Cancel</a> | |
| 84 | </form> | |
| 85 | </div> | |
| 86 | </div> | |
| 87 | [/if] | |
| 88 | ||
| 89 | [if:!$has_pins] | |
| 90 | <div class="module"> | |
| 91 | <div class="module-body"> | |
| 92 | <p class="dim">This release has no pinned files. Named releases created via the sidebar's "Save bookmark" form protect blobs implicitly (by scope), but don't create per-file pins. Use the dashboard's "Pin these →" flow (or <a href="/pin_hotspots.cgi" style="color:var(--accent-hi)">/pin_hotspots.cgi</a>) to create a pin-based release.</p> | |
| 93 | </div> | |
| 94 | </div> | |
| 95 | [/if] |