42 lines
1.5 KiB
HTML
42 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Imported Parts · {{ app_name }}{% endblock %}
|
|
{% block body %}
|
|
{% include "_nav.html" %}
|
|
<main class="container">
|
|
<h1>Imported Parts</h1>
|
|
|
|
<div class="card">
|
|
<h2>OData Configuration</h2>
|
|
<form hx-post="/admin/imported-parts/config"
|
|
hx-target="#config-status"
|
|
hx-swap="innerHTML"
|
|
class="form-grid">
|
|
<label>OData URL
|
|
<input type="url" name="odata_url" value="{{ config.odata_url or '' }}" placeholder="https://…">
|
|
</label>
|
|
<label>Username
|
|
<input type="text" name="username" value="{{ config.username or '' }}" autocomplete="off">
|
|
</label>
|
|
<label>Password
|
|
<input type="password" name="password" placeholder="{{ '(set — leave blank to keep)' if config.has_password else '(none set)' }}" autocomplete="new-password">
|
|
</label>
|
|
<button type="submit" class="btn btn-primary">Save Configuration</button>
|
|
</form>
|
|
<div id="config-status" class="muted" style="margin-top:.5rem"></div>
|
|
</div>
|
|
|
|
<div style="margin-bottom:1rem">
|
|
<button class="btn btn-primary"
|
|
hx-post="/admin/imported-parts/refresh"
|
|
hx-target="#imported-parts-section"
|
|
hx-swap="outerHTML"
|
|
hx-indicator="#refresh-indicator">
|
|
Refresh from OData
|
|
</button>
|
|
<span id="refresh-indicator" class="htmx-indicator muted"> Loading…</span>
|
|
</div>
|
|
|
|
{% include "admin/_imported_parts_table.html" %}
|
|
</main>
|
|
{% endblock %}
|