exlab_wizard.ui.equipment_form#

Shared assembler for an EquipmentConfig from raw form fields.

GUI/Orchestrator Redesign §6: both the Settings → Equipment List section and the Add-Equipment wizard build their final EquipmentConfig through this single function so the two surfaces stay in lockstep without copy-paste drift.

This module is pure (no NiceGUI dependency) and lives outside the pages/ package so the wizard module can import it without a circular dependency through Settings.

Functions

build_equipment_config(*, equipment_id, ...)

Assemble a validated EquipmentConfig from raw form fields.

exlab_wizard.ui.equipment_form.build_equipment_config(*, equipment_id, label, nas_root, sync_mode='nas')[source]#

Assemble a validated EquipmentConfig from raw form fields.

Redesign §3.2: sync_mode (“nas” or “stage”) dictates the device’s role. rclone.conf NAS-sync migration (Phase 8): neither mode carries a per-equipment connection block. The NAS connection is defined once by the nas: remote; the staging hop is defined once by orchestrator.staging_remote / staging_base_root. The push target is selected by sync_mode at sync time.

Equipment no longer stores its own local_root: its data directory is derived from the single app root (<config.paths.local_root>/<id>).

Parameters:
  • equipment_id (str)

  • label (str)

  • nas_root (str)

  • sync_mode (str)

Return type:

EquipmentConfig