Making dashboard a bit more useful
This commit is contained in:
1 parent
3253d8e858
commit
9a9ebab7c8
5 files changed
+620
-2
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<div id="dashboard-sync-card" class="card">
|
||||
<h2>Data sync</h2>
|
||||
<dl class="kv">
|
||||
<dt>Scopes</dt>
|
||||
<dd>{{ scope_count }}</dd>
|
||||
<dt>Imported parts skipped</dt>
|
||||
<dd>{% if can_sync_augmented_parts %}<a href="/admin/augmented-parts/skipped">{{ skipped_count }}</a>{% else %}{{ skipped_count }}{% endif %}</dd>
|
||||
</dl>
|
||||
|
||||
{% if status_message %}<p class="muted">✅ {{ status_message }}</p>{% endif %}
|
||||
{% if status_error %}<p class="muted">⚠️ {{ status_error }}</p>{% endif %}
|
||||
|
||||
{% if can_refresh_odata or can_sync_augmented_parts or can_recompute_fits %}
|
||||
<div class="dashboard-sync-actions">
|
||||
{% if can_refresh_odata %}
|
||||
<form hx-post="/dashboard/refresh-odata" hx-target="#dashboard-sync-card" hx-swap="outerHTML">
|
||||
<button type="submit" class="btn btn-primary">Refresh from OData</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if can_sync_augmented_parts %}
|
||||
<form hx-post="/dashboard/sync-augmented-parts" hx-target="#dashboard-sync-card" hx-swap="outerHTML">
|
||||
<button type="submit" class="btn btn-primary">Sync augmented parts</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if can_recompute_fits %}
|
||||
<form hx-post="/dashboard/recompute-fits" hx-target="#dashboard-sync-card" hx-swap="outerHTML">
|
||||
<button type="submit" class="btn btn-primary">Recompute possible fits</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in new issue
Block a user