Webapp redesign phase 1: shell, tokens and shared components

- static/pxe-ui.css: the redesign's colour tokens (light and dark),
  shell, chips, stage track, expandable rows, menus and buttons. The
  legacy tokens (--bg-card, --border, --text-light, ...) alias onto the
  new ones so pages not yet redesigned blend in.
- base.html: new sidebar (Operate, Images, Updates, Tools) with the GE
  Aerospace logo on the brand blue, to-do count, theme toggle with
  aria-pressed, and a menu button on narrow screens. The to-do banner is
  now a one-line strip. Skip link and <main> landmark added.
- _ui.html: Jinja macros for chip, track, the actions menu and the page
  header.
This commit is contained in:
cproudlock
2026-10-14 13:38:05 -04:00
parent dfd57bef17
commit 35cad62733
3 changed files with 363 additions and 143 deletions

239
webapp/static/pxe-ui.css Normal file
View File

@@ -0,0 +1,239 @@
/* ==========================================================================
pxe-ui.css - PXE Manager redesign: tokens, shell and components.
Loads AFTER bootstrap.min.css and pxe-theme.css. The legacy tokens
(--bg-card, --border, --text-light, ...) are pointed at the new ones at
the bottom of the token block, so pages not yet redesigned blend in.
Air-gap safe: no external fonts or URLs.
========================================================================== */
/* --------------------------------------------------------------------------
Tokens. Light on :root, dark under [data-theme="dark"] (set by base.html
before first paint) and under prefers-color-scheme as a no-JS fallback.
-------------------------------------------------------------------------- */
:root {
--bg: #EEF1F4; --surface: #FFFFFF; --surface-2: #F6F7F9; --surface-3: #F1F3F6;
--text: #12161C; --text-2: #3A424E; --muted: #4A5361; --line: #E6EAEF; --line-2: #D5DBE2; --control: #7D8899;
--accent: #1F5FBF; --accent-hover: #174A94; --on-accent: #FFFFFF;
--fail: #B42318; --on-fail: #FFFFFF; --fail-soft: #FDECEA; --fail-text: #8F1C13;
--act: #F2A93B; --on-act: #151B24; --act-edge: #9A6200; --act-track: #C27C0E;
--run: #1F5FBF; --on-run: #FFFFFF;
--ok: #2E7D4F; --ok-soft: #E3F2E9; --ok-text: #14532D;
--warn-soft: #FFF0D6; --warn-text: #6B4000;
--neutral-soft: #E8EDF3; --neutral-text: #151B24;
--w11-soft: #E1ECFA; --w11-text: #174A94;
--w10-soft: #E8EBEF; --w10-text: #3A424E;
--off-soft: #FFFFFF; --off-text: #3A424E; --off-edge: #7D8899;
--edit-soft: #F2F7FF; --remove-soft: #F4F5F7;
--track-empty: #C9D1DC; --track-done: #7D8899;
--tip-bg: #151B24; --tip-text: #FFFFFF;
--del-bg: #FDECEA; --del-text: #8F1C13; --add-bg: #E3F2E9; --add-text: #14532D;
--backdrop: rgba(18, 22, 28, .55); --shadow: rgba(18, 22, 28, .08);
/* GE brand sidebar (theme-invariant colours, own tokens so dark can deepen it) */
--side-bg: #00003D; --side-hi: rgba(255, 255, 255, .12); --side-text: #E3E6F5; --side-head: #A4ABD6;
--side-mark: #4181FF; --badge-bg: #E8EDF3; --badge-text: #151B24;
--savebar-bg: #151B24; --savebar-edge: #151B24; --savebar-text: #FFFFFF; --savebar-sub: #C9D1DC;
--savebar-pri: #78A9F0; --on-savebar-pri: #0F141A;
--font: 'Segoe UI', system-ui, -apple-system, sans-serif;
--font-mono: Consolas, 'SF Mono', ui-monospace, monospace;
}
[data-theme="dark"] {
--bg: #0F141A; --surface: #182029; --surface-2: #1E2731; --surface-3: #232D38;
--text: #E6EAF0; --text-2: #C2CAD4; --muted: #A3ADB9; --line: #26303B; --line-2: #34404D; --control: #7B8796;
--accent: #78A9F0; --accent-hover: #9BC0F5; --on-accent: #0F141A;
--fail: #F0705F; --on-fail: #1A0B09; --fail-soft: #3A1A17; --fail-text: #FFB4A9;
--act: #F2A93B; --on-act: #151B24; --act-edge: #F2A93B; --act-track: #F2A93B;
--run: #78A9F0; --on-run: #0F141A;
--ok: #4CAF78; --ok-soft: #173323; --ok-text: #9AD8B0;
--warn-soft: #3A2C10; --warn-text: #F6CD7E;
--neutral-soft: #2A3440; --neutral-text: #E6EAF0;
--w11-soft: #1C2F4A; --w11-text: #A9C8F5;
--w10-soft: #2A3038; --w10-text: #C7CED7;
--off-soft: #182029; --off-text: #C2CAD4; --off-edge: #7B8796;
--edit-soft: #17243A; --remove-soft: #1B222B;
--track-empty: #34404D; --track-done: #8592A3;
--tip-bg: #E6EAF0; --tip-text: #0F141A;
--del-bg: #3A1A17; --del-text: #FFB4A9; --add-bg: #173323; --add-text: #9AD8B0;
--backdrop: rgba(0, 0, 0, .6); --shadow: rgba(0, 0, 0, .35);
--side-bg: #00002A; --badge-bg: #2A3440; --badge-text: #E6EAF0;
--savebar-bg: #2B3542; --savebar-edge: #4A5666;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--bg: #0F141A; --surface: #182029; --surface-2: #1E2731; --surface-3: #232D38;
--text: #E6EAF0; --text-2: #C2CAD4; --muted: #A3ADB9; --line: #26303B; --line-2: #34404D; --control: #7B8796;
--accent: #78A9F0; --accent-hover: #9BC0F5; --on-accent: #0F141A;
}
}
/* Legacy tokens (pxe-theme.css and Bootstrap pages) follow the new ones. */
:root, [data-theme="dark"] {
--bg-card: var(--surface); --bg-card-solid: var(--surface); --border: var(--line-2);
--text-light: var(--muted); --link: var(--accent); --primary: var(--accent); --primary-dark: var(--accent-hover);
--sidebar-bg: var(--side-bg); --sidebar-width: 236px;
--bs-body-bg: var(--bg); --bs-body-color: var(--text); --bs-border-color: var(--line-2);
}
/* --------------------------------------------------------------------------
Base
-------------------------------------------------------------------------- */
body { font-family: var(--font); font-size: 14px; letter-spacing: 0; line-height: 1.5; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.sub { font-size: 12px; color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 6px; z-index: 2000; }
.skip-link:focus { top: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; flex: none; }
/* --------------------------------------------------------------------------
Shell: GE sidebar + main
-------------------------------------------------------------------------- */
.ui-shell { display: flex; min-height: 100vh; }
.ui-side {
position: sticky; top: 0; height: 100vh; overflow-y: auto;
flex: 0 0 236px; max-width: 236px; box-sizing: border-box;
background: var(--side-bg); color: var(--side-text);
padding: 16px 12px; display: flex; flex-direction: column; gap: 18px; z-index: 1000;
}
.ui-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 8px; }
.ui-brand .logo { width: 150px; max-width: 100%; filter: brightness(0) invert(1); display: block; }
.ui-brand .app { font-weight: 600; font-size: 14px; color: #FFFFFF; margin-top: 6px; }
.ui-brand .host { font-family: var(--font-mono); font-size: 11px; color: var(--side-head); }
.ui-menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; background: transparent; color: #FFFFFF; }
.ui-groups { display: flex; flex-direction: column; gap: 16px; }
.ui-group { display: flex; flex-direction: column; gap: 2px; }
.ui-navhead { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-head); padding: 0 12px 4px; }
.ui-navlink {
display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 12px;
border-radius: 7px; color: var(--side-text); text-decoration: none; font-size: 14px;
}
.ui-navlink:hover { background: var(--side-hi); color: #FFFFFF; }
.ui-navlink[aria-current] { background: var(--side-hi); color: #FFFFFF; font-weight: 600; box-shadow: inset 3px 0 0 var(--side-mark); }
.ui-navlink .count { font-family: var(--font-mono); font-size: 12px; background: var(--badge-bg); color: var(--badge-text); border-radius: 10px; padding: 1px 8px; }
.ui-side a:focus-visible, .ui-side button:focus-visible { outline-color: #FFFFFF; }
.ui-theme {
display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; margin-top: auto;
border: 1px solid rgba(255,255,255,.35); border-radius: 7px; background: transparent; color: var(--side-text); font: inherit; font-size: 13px;
}
.ui-main { flex: 1 1 560px; min-width: 0; padding: 28px clamp(16px, 4vw, 48px) 56px; box-sizing: border-box; }
/* Legacy pages set .main-content; inside the new shell it needs no offset. */
.ui-main.main-content { margin-left: 0; }
@media (max-width: 991px) {
.ui-shell { flex-direction: column; }
.ui-side { position: static; height: auto; flex: none; max-width: none; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ui-side .ui-groups, .ui-side .ui-theme { display: none; }
.ui-side.open .ui-groups { display: flex; flex-basis: 100%; }
.ui-side.open .ui-theme { display: flex; flex-basis: 100%; }
.ui-menu-btn { display: inline-flex; }
}
/* Page header ------------------------------------------------------------ */
.ui-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.ui-head .eyebrow-t { font-size: 13px; color: var(--muted); }
.ui-head h1 { margin: 2px 0 0; font-size: 28px; font-weight: 600; letter-spacing: 0; }
.ui-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ui-stack { display: flex; flex-direction: column; gap: 22px; }
h2.sec { margin: 0; font-size: 18px; font-weight: 600; }
/* Global to-do strip (one line) ------------------------------------------- */
.ui-todo { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 18px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px var(--shadow); color: var(--text); text-decoration: none; }
.ui-todo:hover { color: var(--text); box-shadow: 0 2px 8px var(--shadow); }
/* --------------------------------------------------------------------------
Components
-------------------------------------------------------------------------- */
.panel { background: var(--surface); border-radius: 14px; box-shadow: 0 1px 2px var(--shadow); }
.chip { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 5px; line-height: 1.4; letter-spacing: 0; }
.c-fail { background: var(--fail); color: var(--on-fail); }
.c-err { background: var(--fail-soft); color: var(--fail-text); box-shadow: inset 0 0 0 1px var(--fail); }
.c-act { background: var(--act); color: var(--on-act); box-shadow: inset 0 0 0 1px var(--act-edge); }
.c-run { background: var(--run); color: var(--on-run); }
.c-ok { background: var(--ok-soft); color: var(--ok-text); }
.c-warn { background: var(--warn-soft); color: var(--warn-text); }
.c-neutral { background: var(--neutral-soft); color: var(--neutral-text); }
.c-w11 { background: var(--w11-soft); color: var(--w11-text); }
.c-w10 { background: var(--w10-soft); color: var(--w10-text); }
.c-off { background: var(--off-soft); color: var(--off-text); box-shadow: inset 0 0 0 1px var(--off-edge); }
.c-edit { background: var(--accent); color: var(--on-accent); }
.c-remove { background: var(--text-2); color: var(--surface); }
/* Truncation: full text stays in the DOM (screen readers read it); hover
shows it. Status, errors, safety warnings and reasons are never hover-only. */
.tip { position: relative; min-width: 0; display: block; }
.tip.inl { display: inline-block; }
.trunc { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip[data-tip]:hover::after {
content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
width: max-content; max-width: min(440px, 80vw); white-space: normal;
background: var(--tip-bg); color: var(--tip-text); font: 400 12px/1.45 var(--font);
padding: 7px 10px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); text-align: left;
}
.tip.right[data-tip]:hover::after { left: auto; right: 0; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.chev { color: var(--muted); font-size: 11px; transition: transform .15s; flex: none; }
details[open] > summary .chev { transform: rotate(180deg); }
.disc { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--accent); font-weight: 600; }
.ui-btn {
display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px; box-sizing: border-box;
padding: 0 12px; border: 1px solid var(--control); border-radius: 7px; background: var(--surface); color: var(--text);
text-decoration: none; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; letter-spacing: 0;
}
.ui-btn:hover { color: var(--text); background: var(--surface-3); }
.ui-btn.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.ui-btn.pri:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.ui-btn.danger { border-color: var(--fail); color: var(--fail-text); }
.ui-btn.attest { border-color: var(--text-2); font-weight: 600; }
.ui-btn.ghost { border-color: transparent; background: transparent; }
.ui-btn.ghost:hover { background: var(--surface-3); }
.ui-btn[disabled] { opacity: .55; cursor: not-allowed; }
.ui-btn.sm { min-height: 28px; padding: 0 8px; font-size: 12px; }
.fbtn { white-space: nowrap; padding: 0 12px; min-height: 30px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.fbtn[aria-pressed="true"], .fbtn[aria-current] { background: var(--text); color: var(--surface); border-color: var(--text); }
details.more { display: inline-block; position: relative; vertical-align: middle; }
details.more .menu {
position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; box-sizing: border-box;
min-width: min(180px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 6px 18px var(--shadow);
padding: 4px; display: flex; flex-direction: column; text-align: left;
}
details.more .menu a, details.more .menu button, details.more .menu form > button {
display: block; width: 100%; padding: 9px 12px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text);
text-decoration: none; text-align: left; border-radius: 5px; cursor: pointer; white-space: nowrap;
}
details.more .menu a:hover, details.more .menu button:hover { background: var(--surface-3); }
details.more .menu .sep { height: 1px; background: var(--line); margin: 4px 0; }
details.more .menu .del { color: var(--fail-text); }
details.more .menu [disabled] { color: var(--muted); cursor: not-allowed; }
details.more .menu form { margin: 0; }
@media (max-width: 600px) { details.more.lft .menu { left: 0; right: auto; } }
.field { height: 36px; box-sizing: border-box; border: 1px solid var(--control); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-text); font-size: 13px; line-height: 1.5; }
.notice.info { background: var(--neutral-soft); color: var(--neutral-text); }
.notice.bad { background: var(--fail-soft); color: var(--fail-text); }
.errbox { padding: 10px 12px; border-radius: 8px; background: var(--fail-soft); color: var(--fail-text); font-size: 13px; line-height: 1.5; }
.errbox pre { margin: 8px 0 0; font-size: 12px; white-space: pre-wrap; color: var(--text-2); }
.track { display: flex; gap: 3px; margin-top: 8px; }
.track i { flex: 1; height: 6px; border-radius: 2px; background: var(--track-empty); }
.track i.d { background: var(--track-done); }
.track i.fail { background: var(--fail); } .track i.act { background: var(--act-track); }
.track i.run { background: var(--run); } .track i.ok { background: var(--ok); }
/* Expandable list rows: one line, details below, actions outside <summary>. */
.ui-list { container-type: inline-size; }
.ui-row { position: relative; border-top: 1px solid var(--line); }
.ui-row > .act { position: absolute; right: 16px; top: 7px; display: flex; gap: 6px; align-items: center; }
.ui-rowhead { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.hidden-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); background: var(--surface-2); }
.panel > .hidden-bar:last-child { border-radius: 0 0 14px 14px; }
/* Flash messages restyled to the token palette (Bootstrap markup kept). */
.ui-main > .alert { border-radius: 10px; border: 0; box-shadow: 0 1px 2px var(--shadow); }

37
webapp/templates/_ui.html Normal file
View File

@@ -0,0 +1,37 @@
{# Shared redesign macros. Import with: {% import '_ui.html' as ui %} #}
{# Status chip. kind: fail err act run ok warn neutral w11 w10 off edit remove #}
{% macro chip(text, kind='neutral', title=None) -%}
<span class="chip c-{{ kind }}"{% if title %} title="{{ title }}"{% endif %}>{{ text }}</span>
{%- endmacro %}
{# Segmented stage track: one segment per stage; earlier ones grey, the
current one in the status colour (kind: fail act run ok). #}
{% macro track(total, current, kind='run', label=None) -%}
{% set total = total or 0 %}{% set current = current or 0 %}
<div class="track" role="img" aria-label="{{ label or ('Stage ' ~ current ~ ' of ' ~ total) }}">
{%- for i in range(1, total + 1) -%}
<i class="{{ kind if kind == 'ok' else ('d' if i < current else (kind if i == current else '')) }}"></i>
{%- endfor -%}
</div>
{%- endmacro %}
{# "..." menu. The caller block supplies <a>/<button>/<form> items. #}
{% macro more(label, left=False) -%}
<details class="more{{ ' lft' if left }}">
<summary class="ui-btn ghost" aria-label="More actions for {{ label }}">&#8943;</summary>
<div class="menu">{{ caller() }}</div>
</details>
{%- endmacro %}
{# Page header. The caller block, if any, renders the right-hand actions. #}
{% macro head(title, eyebrow=None, sub=None) -%}
<header class="ui-head">
<div>
{% if eyebrow %}<div class="eyebrow-t">{{ eyebrow }}</div>{% endif %}
<h1>{{ title }}</h1>
{% if sub %}<div class="sub" style="margin-top: 2px">{{ sub }}</div>{% endif %}
</div>
{% if caller is defined %}<div class="actions">{{ caller() }}</div>{% endif %}
</header>
{%- endmacro %}

View File

@@ -10,6 +10,8 @@
<link href="{{ url_for('static', filename='bootstrap-icons.min.css') }}" rel="stylesheet">
<!-- pxe-theme.css loads AFTER bootstrap so its token+component rules win -->
<link href="{{ url_for('static', filename='pxe-theme.css') }}" rel="stylesheet">
<!-- pxe-ui.css: redesign tokens and components; legacy tokens alias onto it -->
<link href="{{ url_for('static', filename='pxe-ui.css') }}" rel="stylesheet">
<script>
// Set the theme before first paint to avoid an unstyled flash.
(function () {
@@ -26,164 +28,92 @@
{% block extra_head %}{% endblock %}
</head>
<body>
<!-- Sidebar -->
<nav class="sidebar d-flex flex-column">
<div class="sidebar-header">
<img class="sidebar-logo" src="{{ url_for('static', filename='ge-aerospace-logo.svg') }}" alt="GE Aerospace">
<div class="brand-title">PXE Manager</div>
</div>
<ul class="sidebar-nav nav flex-column mt-2">
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'dashboard' %}active{% endif %}"
href="{{ url_for('dashboard') }}">
<i class="bi bi-speedometer2"></i> Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'images_import' %}active{% endif %}"
href="{{ url_for('images_import') }}">
<i class="bi bi-box-arrow-in-down"></i> Image Import
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'imaging_dashboard' %}active{% endif %}"
href="{{ url_for('imaging_dashboard') }}">
<i class="bi bi-activity"></i> Imaging Progress
</a>
</li>
</ul>
<div class="nav-section">Tools</div>
<ul class="sidebar-nav nav flex-column">
<li class="nav-item">
<a class="nav-link {% if request.endpoint in ['startnet_editor', 'shopfloor_menu'] %}active{% endif %}"
href="{{ url_for('startnet_editor') }}">
<i class="bi bi-list-ol"></i> Boot Menu
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'clonezilla_backups' %}active{% endif %}"
href="{{ url_for('clonezilla_backups') }}">
<i class="bi bi-hdd-stack"></i> Clonezilla Backups
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'blancco_reports' %}active{% endif %}"
href="{{ url_for('blancco_reports') }}">
<i class="bi bi-shield-check"></i> Blancco Reports
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'hardware_page' %}active{% endif %}"
href="{{ url_for('hardware_page') }}">
<i class="bi bi-cpu"></i> Hardware Coverage
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'blancco_todo' %}active{% endif %}"
href="{{ url_for('blancco_todo') }}">
<i class="bi bi-clipboard-check"></i> Technician To-Do
{% if blancco_todo.total %}<span class="badge badge-warning ms-1">{{ blancco_todo.total }}</span>{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'enrollment' %}active{% endif %}"
href="{{ url_for('enrollment') }}">
<i class="bi bi-pc-display"></i> Enrollment
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint == 'audit_log' %}active{% endif %}"
href="{{ url_for('audit_log') }}">
<i class="bi bi-list-check"></i> Audit Log
</a>
</li>
</ul>
<div class="nav-section">Updates</div>
<ul class="sidebar-nav nav flex-column">
<li class="nav-item">
<a class="nav-link {% if request.endpoint and request.endpoint.startswith('dell_updates.') %}active{% endif %}"
href="{{ url_for('dell_updates.page') }}">
<i class="bi bi-motherboard"></i> Dell Drivers and BIOS
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint and request.endpoint.startswith('ipxe.') %}active{% endif %}"
href="{{ url_for('ipxe.page') }}">
<i class="bi bi-shield-lock"></i> iPXE Boot Files
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if request.endpoint and request.endpoint.startswith('blancco_update.') %}active{% endif %}"
href="{{ url_for('blancco_update.page') }}">
<i class="bi bi-eraser"></i> Blancco Updates
</a>
</li>
<li class="nav-item">
{# Plain href: the page still renders if views.bprt_sync is not registered yet. #}
<a class="nav-link {% if request.endpoint and request.endpoint.startswith('bprt_sync.') %}active{% endif %}"
href="/updates/bprt/">
<i class="bi bi-arrow-left-right"></i> BPRT Sync
</a>
</li>
</ul>
<div class="nav-section">GE Aerospace Images</div>
<ul class="sidebar-nav nav flex-column">
{% for it in all_image_types if it.startswith('gea-') %}
{# One entry per image; active on any of its tabs (see _image_header.html). #}
{% set _on_image = image_type is defined and image_type == it
and ((active_tab is defined and active_tab) or image_tab_for_endpoint(request.endpoint)) %}
<li class="nav-item">
<a class="nav-link {% if _on_image %}active{% endif %}"
href="{{ image_tab_url(it, 'overview') }}">
<i class="bi bi-windows"></i> {{ all_friendly_names[it] }}
</a>
</li>
{% endfor %}
</ul>
<!-- Footer pinned to bottom -->
<div class="sidebar-footer mt-auto">
<button type="button" id="themeToggle" class="theme-toggle">
<i class="bi bi-moon-stars" id="themeToggleIcon"></i>
<span id="themeToggleLabel">Dark</span>
<a class="skip-link" href="#main">Skip to content</a>
{% set ep = request.endpoint or '' %}
{% macro navlink(label, href, on, count=None) -%}
<a class="ui-navlink" href="{{ href }}"{% if on %} aria-current="page"{% endif %}>{{ label }}{% if count %}<span class="count">{{ count }}<span class="vh"> open</span></span>{% endif %}</a>
{%- endmacro %}
<div class="ui-shell">
<nav class="ui-side" id="uiSide" aria-label="Main">
<div class="ui-brand">
<div>
<img class="logo" src="{{ url_for('static', filename='ge-aerospace-logo.svg') }}" alt="GE Aerospace">
<div class="app">PXE Manager</div>
<div class="host">{{ request.host.split(':')[0] }}</div>
</div>
<button type="button" class="ui-menu-btn" id="uiMenuBtn" aria-label="Open menu" aria-expanded="false" aria-controls="uiGroups">
<i class="bi bi-list" aria-hidden="true" style="font-size: 20px"></i>
</button>
</div>
<div class="ui-groups" id="uiGroups">
<div class="ui-group">
<div class="ui-navhead">Operate</div>
{{ navlink('Overview', url_for('dashboard'), ep == 'dashboard') }}
{{ navlink('Imaging floor', url_for('imaging_dashboard'), ep in ('imaging_dashboard', 'imaging_session_detail')) }}
{{ navlink('Technician to-do', url_for('blancco_todo'), ep in ('blancco_todo', 'blancco_servicenow'), blancco_todo.total) }}
{{ navlink('Blancco reports', url_for('blancco_reports'), ep in ('blancco_reports', 'blancco_view_report')) }}
{{ navlink('Hardware coverage', url_for('hardware_page'), ep == 'hardware_page') }}
</div>
<div class="ui-group">
<div class="ui-navhead">Images</div>
{% for it in all_image_types if it.startswith('gea-') %}
{# One entry per image; active on any of its tabs (see _image_header.html). #}
{% set _on_image = image_type is defined and image_type == it
and ((active_tab is defined and active_tab) or image_tab_for_endpoint(request.endpoint)) %}
{{ navlink(all_friendly_names[it] | replace('GE Aerospace ', ''), image_tab_url(it, 'overview'), _on_image) }}
{% endfor %}
{{ navlink('All images and import', url_for('images_import'), ep == 'images_import') }}
</div>
<div class="ui-group">
<div class="ui-navhead">Updates</div>
{{ navlink('Dell drivers and BIOS', url_for('dell_updates.page'), ep.startswith('dell_updates.')) }}
{{ navlink('iPXE boot files', url_for('ipxe.page'), ep.startswith('ipxe.')) }}
{{ navlink('Blancco releases', url_for('blancco_update.page'), ep.startswith('blancco_update.')) }}
{# Plain href: the page still renders if views.bprt_sync is not registered yet. #}
{{ navlink('BPRT sync', '/updates/bprt/', ep.startswith('bprt_sync.')) }}
</div>
<div class="ui-group">
<div class="ui-navhead">Tools</div>
{{ navlink('Boot menu', url_for('startnet_editor'), ep in ('startnet_editor', 'shopfloor_menu')) }}
{{ navlink('Enrollment packages', url_for('enrollment'), ep == 'enrollment') }}
{{ navlink('Clonezilla backups', url_for('clonezilla_backups'), ep == 'clonezilla_backups') }}
{{ navlink('Audit log', url_for('audit_log'), ep == 'audit_log') }}
</div>
</div>
<button type="button" id="themeToggle" class="ui-theme" aria-pressed="false">
<i class="bi bi-moon-stars" id="themeToggleIcon" aria-hidden="true"></i>
<span id="themeToggleLabel">Dark theme</span>
</button>
</nav>
<!-- Main content -->
<div class="main-content">
<main class="ui-main main-content" id="main">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Dismiss"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% if blancco_todo.total and request.endpoint not in ('blancco_todo', 'imaging_tiles') %}
<div class="alert alert-warning d-flex flex-wrap align-items-center gap-2 py-2" role="alert">
<i class="bi bi-clipboard-check"></i>
<strong>Technician to-do:</strong>
{% set parts = [] %}
{% if blancco_todo.servicenow %}{% set _ = parts.append(blancco_todo.servicenow ~ ' wipe' ~ ('s' if blancco_todo.servicenow != 1) ~ ' to tick in ServiceNow') %}{% endif %}
{% if blancco_todo.evidence %}{% set _ = parts.append(blancco_todo.evidence ~ ' evidence pack' ~ ('s' if blancco_todo.evidence != 1) ~ ' to upload to Box') %}{% endif %}
{% if blancco_todo.failed %}{% set _ = parts.append(blancco_todo.failed ~ ' failed wipe' ~ ('s' if blancco_todo.failed != 1) ~ ' needing a Certificate of Destruction') %}{% endif %}
{% if blancco_todo.not_in_cloud %}{% set _ = parts.append(blancco_todo.not_in_cloud ~ ' report' ~ ('s' if blancco_todo.not_in_cloud != 1) ~ ' not in the Blancco cloud') %}{% endif %}
{% if blancco_todo.hardware %}{% set _ = parts.append(blancco_todo.hardware ~ ' new model' ~ ('s' if blancco_todo.hardware != 1) ~ ' missing drivers/BIOS') %}{% endif %}
<span>{{ parts | join(' | ') }}</span>
<a href="{{ url_for('blancco_todo') }}" class="ms-auto pxe-btn pxe-btn-secondary btn-row-action">Open to-do</a>
</div>
{% if blancco_todo.total and ep not in ('blancco_todo', 'blancco_servicenow', 'imaging_tiles') %}
{% set parts = [] %}
{% if blancco_todo.servicenow %}{% set _ = parts.append(blancco_todo.servicenow ~ ' to tick in ServiceNow') %}{% endif %}
{% if blancco_todo.failed %}{% set _ = parts.append(blancco_todo.failed ~ ' drive' ~ ('s' if blancco_todo.failed != 1) ~ ' to destroy') %}{% endif %}
{% if blancco_todo.evidence %}{% set _ = parts.append(blancco_todo.evidence ~ ' evidence pack' ~ ('s' if blancco_todo.evidence != 1) ~ ' to upload') %}{% endif %}
{% if blancco_todo.not_in_cloud %}{% set _ = parts.append(blancco_todo.not_in_cloud ~ ' not in the Blancco cloud') %}{% endif %}
{% if blancco_todo.hardware %}{% set _ = parts.append(blancco_todo.hardware ~ ' hardware gap' ~ ('s' if blancco_todo.hardware != 1)) %}{% endif %}
<a class="ui-todo" href="{{ url_for('blancco_todo') }}">
<span class="chip c-neutral">To-do</span>
<span class="trunc" style="flex: 1 1 auto"><strong>{{ blancco_todo.total }} open:</strong> <span class="muted">{{ parts | join(', ') }}</span></span>
<span style="font-weight: 600; color: var(--accent); white-space: nowrap">Open to-do</span>
</a>
{% endif %}
{% block content %}{% endblock %}
</main>
</div>
<script>
@@ -198,11 +128,12 @@
// Label/icon advertise the theme you would switch TO.
if (theme === 'dark') {
if (icon) icon.className = 'bi bi-sun';
if (label) label.textContent = 'Light';
if (label) label.textContent = 'Light theme';
} else {
if (icon) icon.className = 'bi bi-moon-stars';
if (label) label.textContent = 'Dark';
if (label) label.textContent = 'Dark theme';
}
if (btn) btn.setAttribute('aria-pressed', theme === 'dark' ? 'true' : 'false');
}
function apply(theme) {
@@ -223,6 +154,19 @@
})();
</script>
<script>
// Narrow screens: the sidebar collapses to a top bar with a menu button.
(function () {
var side = document.getElementById('uiSide');
var btn = document.getElementById('uiMenuBtn');
if (!side || !btn) return;
btn.addEventListener('click', function () {
var open = side.classList.toggle('open');
btn.setAttribute('aria-expanded', open ? 'true' : 'false');
btn.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
});
})();
</script>
<script src="{{ url_for('static', filename='bootstrap.bundle.min.js') }}"></script>
<script src="{{ url_for('static', filename='app.js') }}"></script>
<script src="{{ url_for('static', filename='qrcode.min.js') }}"></script>