This commit is contained in:
Jonas Bengtsson
2026-10-04 09:28:02 +02:00
parent 87c1c8db7b
commit 4adbb4171e
16 changed files with 788 additions and 29 deletions
+4 -2
View File
@@ -40,7 +40,8 @@ import yaml
from .app import WebUIConfig, build_app
from .modules import ChannelMismatch, ModuleUnknown
from .scenario.dsl import load_node_modules, load_yaml, validate_scenario
from .scenario.dsl import (load_channel_names, load_node_modules,
load_yaml, validate_scenario)
from .scenario.engine import ScenarioEngine, ScenarioError
from .scenario.report import result_summary, write_csv, write_jsonl
@@ -180,6 +181,7 @@ def _prepare_report_path(path: str, option: str) -> Path:
async def _serve(args: argparse.Namespace) -> int:
node_config = _load_yaml_file(args.node, "node config")
modules = load_node_modules(node_config)
channel_names = load_channel_names(node_config)
web_cfg = None
if args.web:
web_cfg = WebUIConfig(
@@ -190,7 +192,7 @@ async def _serve(args: argparse.Namespace) -> int:
readonly=_env_flag("WAGO_SIM_WEB_READONLY"),
)
app = build_app(modules=modules, host=args.host, port=args.port, web=web_cfg,
node_config_path=args.node)
node_config_path=args.node, channel_names=channel_names)
await app.server.start()
web_server = None
if web_cfg is not None: