Version 0.5.5.93: custom fields in lists, MeshCentral sync flag for statuses
- Show custom field values in asset list, dashboard and list Excel export - New status flag to exclude assets (e.g. scrapped) from MeshCentral sync - Require a secure SESSION_SECRET with a readable startup message - Add SESSION_COOKIE_SECURE and refresh session permissions per request - Translate HTTP errors and remaining fixed UI texts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c3f1ef43db
commit
261b4f2029
35 files changed
+768
-308
No files matched your search
@@ -2,12 +2,12 @@
|
||||
{% block content %}
|
||||
<div class="toolbar">
|
||||
<h1>{{ t('assets.import_title') }}</h1>
|
||||
<div class="toolbar-actions"><a class="button button-secondary" href="/assets">← Zur Asset-Liste</a></div>
|
||||
<div class="toolbar-actions"><a class="button button-secondary" href="/assets">← {{ t('assets.import.back_to_list') }}</a></div>
|
||||
</div>
|
||||
|
||||
<section class="panel">
|
||||
<form method="post" action="/assets/import" enctype="multipart/form-data">
|
||||
<label>Kategorie
|
||||
<label>{{ t('common.category') }}
|
||||
<select name="category_id" required>
|
||||
{% for category in categories %}
|
||||
<option value="{{ category.id }}" {% if selected and selected.id == category.id %}selected{% endif %}>{{ category.name }}</option>
|
||||
@@ -19,48 +19,44 @@
|
||||
<p><a class="button button-secondary" href="/assets/import/template.xlsx?category_id={{ selected.id }}">{{ t('assets.import_template') }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
<label>Excel-Datei
|
||||
<label>{{ t('assets.import_file') }}
|
||||
<input type="file" name="file" accept=".xlsx" required>
|
||||
</label>
|
||||
|
||||
<label class="checkbox-label">
|
||||
<input class="checkbox" type="checkbox" name="import_only_active_fields" {% if import_only_active_fields %}checked{% endif %}>
|
||||
Import only active fields
|
||||
{{ t('assets.import_only_active') }}
|
||||
</label>
|
||||
<p class="muted">
|
||||
Standardmäßig werden alle bekannten und für den Excel-Import freigegebenen Felder übernommen,
|
||||
auch wenn sie in der jeweiligen Kategorie nicht aktiv oder sichtbar sind.
|
||||
Aktiviere diese Option nur, wenn der Import auf die aktiven Felder der Kategorie begrenzt werden soll.
|
||||
</p>
|
||||
<p class="muted">{{ t('assets.import_only_active_help') }}</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="button button-secondary" name="import_mode" value="dry_run">🧪 Test-Import</button>
|
||||
<button type="submit" class="button button-secondary" name="import_mode" value="dry_run">🧪 {{ t('assets.import.dry_run') }}</button>
|
||||
<button type="submit" class="button button-save" name="import_mode" value="import">{{ t('assets.import_start') }}</button>
|
||||
</div>
|
||||
<p class="muted">Der Test-Import prüft dieselbe Datei mit derselben Logik, führt aber am Ende einen vollständigen Datenbank-Rollback durch.</p>
|
||||
<p class="muted">{{ t('assets.import.dry_run_help') }}</p>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
{% if result %}
|
||||
<section class="panel">
|
||||
<h2>{% if result.dry_run %}Ergebnis des Test-Imports{% else %}Importergebnis{% endif %}</h2>
|
||||
<h2>{% if result.dry_run %}{{ t('assets.import.dry_run_result') }}{% else %}{{ t('assets.import.result') }}{% endif %}</h2>
|
||||
{% if result.dry_run %}
|
||||
<div class="notice"><strong>Testlauf:</strong> Es wurden keine Daten gespeichert. Die Zähler und Zeilenergebnisse zeigen, was ein echter Import ausführen würde.</div>
|
||||
<div class="notice"><strong>{{ t('assets.import.dry_run_label') }}</strong> {{ t('assets.import.dry_run_notice') }}</div>
|
||||
{% endif %}
|
||||
<dl class="config-list">
|
||||
<dt>Neu angelegt</dt><dd>{{ result.created }}</dd>
|
||||
<dt>Aktualisiert</dt><dd>{{ result.updated }}</dd>
|
||||
<dt>Unverändert</dt><dd>{{ result.skipped }}</dd>
|
||||
<dt>{{ t('assets.import.created') }}</dt><dd>{{ result.created }}</dd>
|
||||
<dt>{{ t('assets.import.updated') }}</dt><dd>{{ result.updated }}</dd>
|
||||
<dt>{{ t('assets.import.unchanged') }}</dt><dd>{{ result.skipped }}</dd>
|
||||
</dl>
|
||||
{% if result.unknown_headers %}
|
||||
<h3>Nicht erkannte Spalten</h3>
|
||||
<h3>{{ t('assets.import.unknown_columns') }}</h3>
|
||||
<p>{{ result.unknown_headers|join(', ') }}</p>
|
||||
{% endif %}
|
||||
{% if result.row_results %}
|
||||
<h3>Ergebnis je Excel-Zeile</h3>
|
||||
<h3>{{ t('assets.import.row_results') }}</h3>
|
||||
<div class="table-scroll">
|
||||
<table class="data-table">
|
||||
<thead><tr><th>Excel-Zeile</th><th>Asset-ID</th><th>Aktion</th><th>Begründung</th></tr></thead>
|
||||
<thead><tr><th>{{ t('assets.import.excel_row') }}</th><th>{{ t('assets.asset_id') }}</th><th>{{ t('jobs.action') }}</th><th>{{ t('assets.import.reason') }}</th></tr></thead>
|
||||
<tbody>
|
||||
{% for row in result.row_results %}
|
||||
<tr>
|
||||
@@ -75,7 +71,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if result.errors %}
|
||||
<h3>Fehlerübersicht</h3>
|
||||
<h3>{{ t('assets.import.error_summary') }}</h3>
|
||||
<ul>{% for error in result.errors %}<li>{{ error }}</li>{% endfor %}</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
Reference in new issue
Block a user