Dashboard#

class openoptics.dashboard.DashboardService(config: DashboardConfig | None = None)[source]#

Bases: object

begin_epoch(seed: str | None = None) → Epoch[source]#
update_topology(slice_to_topo) → None[source]#

Render slice_to_topo to a PNG under media/topos/ and publish.

register_collector(collector: Collector) → None[source]#
register_event_source(source) → None[source]#

Bind a non-polling event source (e.g. ReconfigEventPublisher).

Unlike collectors, event sources have no polling thread; start()/stop() are not invoked on them. Binding just wires repo/broker/epoch_id so the source can persist + broadcast when its emit method is called.

start() → None[source]#
stop() → None[source]#
class openoptics.dashboard.DashboardConfig(enabled: 'bool' = True, host: 'str' = 'localhost', port: 'int' = 8001, poll_interval_s: 'float' = 1.0, state_dir: 'Path' = <factory>, live_queue_size: 'int' = 256)[source]#

Bases: object

enabled: bool = True#
host: str = 'localhost'#
port: int = 8001#
poll_interval_s: float = 1.0#
state_dir: Path#
live_queue_size: int = 256#
property db_path: Path#
property media_dir: Path#
property topos_dir: Path#
ensure_dirs() → None[source]#
classmethod from_env() → DashboardConfig[source]#