Add platform config ingest, storage, API, and UI tab

Auditors can now send BIOS/Redfish platform settings via
POST /ingest/hardware as hardware.platform_config (map[string]any).
Stored as latest-snapshot per machine with per-key change history.
Exposed via GET /api/assets/{id}/platform-config and .../history.
Asset page gets a third tab "Platform Config" with inline history expand.
Contract bumped to v2.9, migration 0024 adds two new tables.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-03-19 15:07:21 +03:00
parent 9cb7626a01
commit aac3a69526
14 changed files with 502 additions and 28 deletions

View File

@@ -103,6 +103,7 @@ func NewServer(addr string, readTimeout, writeTimeout time.Duration, db *sql.DB)
failureRepo := failures.NewFailureRepository(db)
assetRepo := registry.NewAssetRepository(db)
assetLogRepo := registry.NewAssetEventLogRepository(db)
platformConfigRepo := registry.NewAssetPlatformConfigRepository(db)
componentRepo := registry.NewComponentRepository(db)
installationRepo := registry.NewInstallationRepository(db)
timelineRepo := timeline.NewEventRepository(db)
@@ -121,12 +122,13 @@ func NewServer(addr string, readTimeout, writeTimeout time.Duration, db *sql.DB)
Service: ingest.NewService(db),
})
RegisterAssetComponentRoutes(mux, AssetComponentDependencies{
Assets: assetRepo,
AssetLogs: assetLogRepo,
Components: componentRepo,
Installations: installationRepo,
Timeline: timelineRepo,
History: historySvc,
Assets: assetRepo,
AssetLogs: assetLogRepo,
Components: componentRepo,
Installations: installationRepo,
Timeline: timelineRepo,
History: historySvc,
PlatformConfig: platformConfigRepo,
})
RegisterFailureRoutes(mux, FailureDependencies{
Failures: failureRepo,