🚧 WIP
This commit is contained in:
+5
-3
@@ -40,8 +40,8 @@ import yaml
|
||||
|
||||
from .app import WebUIConfig, build_app
|
||||
from .modules import ChannelMismatch, ModuleUnknown
|
||||
from .scenario.dsl import (load_channel_names, load_node_modules,
|
||||
load_yaml, validate_scenario)
|
||||
from .scenario.dsl import (load_channel_names, load_channel_ranges,
|
||||
load_node_modules, load_yaml, validate_scenario)
|
||||
from .scenario.engine import ScenarioEngine, ScenarioError
|
||||
from .scenario.report import result_summary, write_csv, write_jsonl
|
||||
|
||||
@@ -182,6 +182,7 @@ 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)
|
||||
channel_ranges = load_channel_ranges(node_config)
|
||||
web_cfg = None
|
||||
if args.web:
|
||||
web_cfg = WebUIConfig(
|
||||
@@ -192,7 +193,8 @@ 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, channel_names=channel_names)
|
||||
node_config_path=args.node, channel_names=channel_names,
|
||||
channel_ranges=channel_ranges)
|
||||
await app.server.start()
|
||||
web_server = None
|
||||
if web_cfg is not None:
|
||||
|
||||
Reference in New Issue
Block a user