we do a little exporting
This commit is contained in:
@@ -37,14 +37,49 @@
|
||||
</div>
|
||||
|
||||
<div class="card warning-box">
|
||||
<h3>Wipe & Reseed</h3>
|
||||
<h3>Wipe All Data</h3>
|
||||
<p class="subtitle">
|
||||
Delete <strong>all</strong> data — entities, domains, combinations,
|
||||
pipeline runs — then reload seed data from scratch.
|
||||
pipeline runs. Use Reseed afterwards to restore seed data.
|
||||
</p>
|
||||
<form method="post" action="{{ url_for('admin.wipe_and_reseed') }}" style="margin-top: 0.75rem"
|
||||
onsubmit="return confirm('This will permanently delete ALL data and reseed from scratch. Continue?')">
|
||||
<button type="submit" class="btn btn-danger">Wipe & Reseed</button>
|
||||
<form method="post" action="{{ url_for('admin.wipe') }}" style="margin-top: 0.75rem"
|
||||
onsubmit="return confirm('This will permanently delete ALL data. Continue?')">
|
||||
<button type="submit" class="btn btn-danger">Wipe</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Snapshots</h2>
|
||||
<div class="card-grid">
|
||||
<div class="card">
|
||||
<h3>Export Snapshot</h3>
|
||||
<p class="subtitle">
|
||||
Download the full database state as a JSON file — entities,
|
||||
domains, combinations, results, and scores.
|
||||
</p>
|
||||
<div style="margin-top: 0.75rem">
|
||||
<a href="{{ url_for('admin.snapshot_export') }}" class="btn btn-primary">Download JSON</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Import Snapshot</h3>
|
||||
<p class="subtitle">
|
||||
Upload a previously exported JSON snapshot. Merge adds new data
|
||||
alongside existing; clear wipes everything first.
|
||||
</p>
|
||||
<form method="post" action="{{ url_for('admin.snapshot_import') }}"
|
||||
enctype="multipart/form-data" style="margin-top: 0.75rem">
|
||||
<div class="form-group">
|
||||
<input type="file" name="file" accept=".json" required>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 0.75rem">
|
||||
<button type="submit" class="btn btn-primary">Import (Merge)</button>
|
||||
<button type="submit" name="clear" value="1" class="btn btn-danger"
|
||||
onclick="return confirm('This will wipe ALL existing data before importing. Continue?')">
|
||||
Import (Clear & Replace)
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user