summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-06-17 18:40:53 +0300
committerDevaev Maxim <[email protected]>2021-06-17 18:40:53 +0300
commit5912693c1af7a6f358563ba1634f9e15c5220fc3 (patch)
tree4f5338c1d872d4fc28454aa876e87e6abcca146e /kvmd
parente6a5d5648f093139e98a7e71abcaa43ad3234d00 (diff)
make janus-static work for web ui
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/apps/kvmd/info/extras.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/kvmd/apps/kvmd/info/extras.py b/kvmd/apps/kvmd/info/extras.py
index 61b2f483..375aab04 100644
--- a/kvmd/apps/kvmd/info/extras.py
+++ b/kvmd/apps/kvmd/info/extras.py
@@ -21,6 +21,7 @@
import os
+import re
from typing import Dict
from typing import Optional
@@ -51,9 +52,10 @@ class ExtrasInfoSubmanager(BaseInfoSubmanager):
try:
extras_path = self.__global_config.kvmd.info.extras
extras: Dict[str, Dict] = {}
- for app in os.listdir(extras_path):
- if app[0] != "." and os.path.isdir(os.path.join(extras_path, app)):
- extras[app] = load_yaml_file(os.path.join(extras_path, app, "manifest.yaml"))
+ for name in os.listdir(extras_path):
+ if name[0] != "." and os.path.isdir(os.path.join(extras_path, name)):
+ app = re.sub(r"[^a-zA-Z0-9_]+", "_", name)
+ extras[app] = load_yaml_file(os.path.join(extras_path, name, "manifest.yaml"))
self.__rewrite_app_daemon(extras[app])
self.__rewrite_app_port(extras[app])
return extras