Webapp: fix six live bugs found in the page inventory

- Report view: the hero summarised only the first erasure, so a drive whose
  Purge failed and Clear fallback succeeded showed Failed while the list said
  Successful. It now uses the per-drive outcome (report_result) and lists the
  standards that wiped each drive.
- To-do and ServiceNow: reports with no usable document id could never be
  ticked or cleared (400). They are now tracked by file name (file:<name>).
- Imaging: the LAPS password field is masked, with a Show/Hide toggle.
- Imaging: succeeded sessions not updated for ACTIVE_WINDOW_HOURS are hidden
  from the dashboard (failed and in-progress always stay), with Show all.
- Enrollment: the active SFLD package can no longer be deleted, which left
  ppkg.conf pointing at a missing file; its row is marked Active.
- Import: confirm before importing, saying upload-folder sources are moved
  and same-name files in the image are overwritten.
This commit is contained in:
cproudlock
2026-10-14 13:29:00 -04:00
parent 24b4d9df66
commit dfd57bef17
10 changed files with 108 additions and 21 deletions

View File

@@ -43,9 +43,11 @@
{# Hero summary: state badge + standard + drive count + erasure datetime #}
{% set first = (data.erasures or [{}])[0] %}
{% set overall_state = first.state or 'Unknown' %}
{% set overall_tone = 'success' if overall_state == 'Successful' else 'danger' if overall_state else 'secondary' %}
{% set overall_stat = 'success' if overall_state == 'Successful' else 'danger' if overall_state else '' %}
{% set overall_state = result or 'Unknown' %}
{% set overall_tone = 'success' if overall_state == 'Successful' else 'danger' if result else 'secondary' %}
{% set overall_stat = 'success' if overall_state == 'Successful' else 'danger' if result else '' %}
{% set wiped = outcomes.values() | selectattr('ok') | list %}
{% set standards = wiped | map(attribute='standard') | reject('equalto', '') | unique | list %}
<div class="dashboard-grid mb-4">
<div class="stat-card {{ overall_stat }}">
<div class="label">Overall result</div>
@@ -55,11 +57,11 @@
</div>
<div class="stat-card">
<div class="label">Erasure standard</div>
<div class="value" style="font-size:1.05rem;">{{ first.erasure_standard_name or '-' }}</div>
<div class="value" style="font-size:1.05rem;">{{ standards | join(', ') if standards else (first.erasure_standard_name or '-') }}</div>
</div>
<div class="stat-card">
<div class="label">Drives erased</div>
<div class="value">{{ data.erasures | length }}</div>
<div class="value">{{ wiped | length }} of {{ outcomes | length }}</div>
</div>
<div class="stat-card">
<div class="label">Elapsed time</div>