From adc5b7f69e32e9c490e595ae1791d078a66ec5d0 Mon Sep 17 00:00:00 2001
From: cproudlock
Date: Sun, 12 Jul 2026 18:06:33 -0400
Subject: [PATCH] Add GE-Enforce export-to-share + fleet-compliance UI
(Milestone 1 UX)
Rounds out the Milestone 1 admin experience: author + publish in shopdb, push
to the share by a button, and see what the fleet actually did.
Export to share:
- GET/PUT /api/geenforce/config stores the on-share export root (Setting
geenforce_share_root); POST /scopes//export-share writes the current
published JSON to //manifest.json (preinstall.json for the
preinstall phase), backing up the existing file to _meta/history first.
geenforce.publish gated. The engine and PCs are untouched - this is the safe
Milestone 1 push whose rollback is restoring the history backup.
- Editor: a share-root config row + an "Export to Share" button per scope.
- 3 tests (config roundtrip, export writes the file, second export backs up).
Fleet-compliance UI (Settings > Enforcement Reports):
- New page over GET /reports + /reports/: latest report per PC with
received (applied vs latest published version), status (ok/selfhealed/failed),
and install/skip/fail counts; row detail shows per-entry outcomes with
self-heal flags, exit codes, and messages. Hostname/PC-type filters.
- ADR-010 settings card + ADR-009 plugin-gated route.
Full suite 883 green; frontend build + naming green.
Co-Authored-By: Claude Opus 4.8
---
frontend/src/router/routes/geenforce.js | 6 +
.../src/views/settings/EnforcementReports.vue | 120 ++++++++++++++++++
.../src/views/settings/ImagingPCTypes.vue | 39 ++++++
plugins/geenforce/api/routes.py | 47 ++++++-
plugins/geenforce/plugin.py | 9 ++
tests/test_plugins/test_geenforce_export.py | 65 ++++++++++
6 files changed, 285 insertions(+), 1 deletion(-)
create mode 100644 frontend/src/views/settings/EnforcementReports.vue
create mode 100644 tests/test_plugins/test_geenforce_export.py
diff --git a/frontend/src/router/routes/geenforce.js b/frontend/src/router/routes/geenforce.js
index 5d0d9d3..a06b4d7 100644
--- a/frontend/src/router/routes/geenforce.js
+++ b/frontend/src/router/routes/geenforce.js
@@ -11,5 +11,11 @@ export default [
name: 'imagingpctypes',
component: () => import('../../views/settings/ImagingPCTypes.vue'),
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'geenforce' }
+ },
+ {
+ path: 'settings/enforcementreports',
+ name: 'enforcementreports',
+ component: () => import('../../views/settings/EnforcementReports.vue'),
+ meta: { requiresAuth: true, requiresAdmin: true, plugin: 'geenforce' }
}
]
diff --git a/frontend/src/views/settings/EnforcementReports.vue b/frontend/src/views/settings/EnforcementReports.vue
new file mode 100644
index 0000000..6e29e26
--- /dev/null
+++ b/frontend/src/views/settings/EnforcementReports.vue
@@ -0,0 +1,120 @@
+
+
+
Enforcement Reports
+
+ Latest GE-Enforce result reported by each PC. "Received" means the PC picked
+ up the current published manifest; status shows self-heal and failures.
+