add more streams
This commit is contained in:
@@ -9,6 +9,7 @@ DEFAULT_CONFIG: dict[str, object] = {
|
||||
"log_source": "local_syslog",
|
||||
"graylog_mcp_url": "",
|
||||
"graylog_stream": "",
|
||||
"graylog_streams": [],
|
||||
"graylog_query": "*",
|
||||
"graylog_field_mapping": "",
|
||||
"llm_enabled": False,
|
||||
@@ -46,6 +47,11 @@ class ConfigStore:
|
||||
current[key] = bool(value)
|
||||
elif key == "log_source" and value in {"local_syslog", "graylog_mcp"}:
|
||||
current[key] = value
|
||||
elif key == "graylog_streams" and isinstance(value, list):
|
||||
current[key] = [
|
||||
{"id": str(item.get("id", "")), "title": str(item.get("title", "")), "enabled": bool(item.get("enabled"))}
|
||||
for item in value if isinstance(item, dict) and item.get("id")
|
||||
]
|
||||
elif isinstance(value, str):
|
||||
current[key] = value.strip()
|
||||
self.path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user