Plugin Configuration
Web UI for runtime plugin management, mounted as sys_app at /_sys/plugin_config/.
Application
Plugin Configuration UI - web interface for viewing and editing plugin config.
Provides a Swagger-like interface to navigate the routing tree and configure plugins at router-level (_all_) and entry-level.
- Mountable as sys_app via config:
- sys_apps:
- plugin_config:
module: “genro_asgi.sys_applications.plugin_config.plugin_config_app:Application”
- Endpoints:
/: Index page with plugin configuration UI. /tree: JSON routing tree with plugin_info. /plugins: Available plugins with configure() signatures. /config: Read plugin configuration for a node. /apply: Apply a config change at runtime (no persistence). /save: Persist current runtime config to plugin_config.json. /revert: Reload config from plugin_config.json, discarding runtime changes. /logs: Read captured log entries. /static: Static resource serving (JS, CSS).
- class genro_asgi.sys_applications.plugin_config.plugin_config_app.Application(**kwargs)[source]
Bases:
AsgiApplicationPlugin configuration web UI. Mountable as sys_app at /_sys/plugin_config/.
Persistence logic (load/save/apply plugin_config.json) lives on AsgiServer. This app is a thin GUI layer that delegates to server methods.
- apply(router_path='', plugin_name='', target='_all_', **config_values)[source]
Apply a plugin config change at runtime without persisting.
- Parameters:
- Returns:
True on success, or “error” key on failure.
- Return type:
- logs(entry='', since='0', limit=100)[source]
Return captured log entries, optionally filtered by entry name.
- openapi_info: ClassVar[dict[str, Any]] = {'description': 'Web UI for viewing and editing plugin configuration at runtime.', 'title': 'Plugin Configuration', 'version': '1.0.0'}
- static(file='')[source]
Serve static resources from resources folder.
- Parameters:
file (
str) – Filename to serve (e.g., “config_panel.js”).- Return type:
- Returns:
Path to the resource file.
- Raises:
ValueError – If file parameter is empty.
FileNotFoundError – If resource file does not exist.