v0.32.2
This commit is contained in:
1 parent
bb025dcf44
commit
b0f211555a
74 files changed
+6089
-556
No files matched your search
@@ -1,13 +1,13 @@
|
||||
from pathlib import Path
|
||||
|
||||
APP_PARTS = ("core.js", "session-resume.js", "refresh.js", "preferences.js", "config-history.js", "runtime.js", "settings.js")
|
||||
APP_PARTS = ("core.js", "session-resume.js", "refresh.js", "preferences.js", "dashboard-layout-editor.js", "dashboard-inline-layout.js", "stream-dashboard.js", "backend-dashboard.js", "config-history.js", "runtime.js", "settings.js")
|
||||
PANEL_PARTS = (
|
||||
"management.js", "drafts.js", "integrations.js", "vhosts.js",
|
||||
"web-server-profiles.js", "web-server.js", "docker.js", "streams.js",
|
||||
"redirects.js", "host404.js", "traffic-panel.js", "cache-panel.js",
|
||||
"transform-panel.js", "acme.js", "settings.js", "certificate-api.js", "file-logs.js",
|
||||
)
|
||||
VHOST_PARTS = ("core.js", "health.js", "rates.js", "editor.js", "render.js")
|
||||
VHOST_PARTS = ("core.js", "protocol.js", "health.js", "rates.js", "editor.js", "render.js")
|
||||
|
||||
def _read(root: Path, folder: str, parts: tuple[str, ...]) -> str:
|
||||
return "\n".join((root / "src/admin/web" / folder / part).read_text(encoding="utf-8") for part in parts)
|
||||
@@ -17,7 +17,15 @@ def read_vhosts_js(root: Path) -> str:
|
||||
return "(() => {\n" + body + "\n})();"
|
||||
|
||||
def read_app_js(root: Path) -> str:
|
||||
primary = _read(root, "app", APP_PARTS)
|
||||
# Mirror the Rust include_str! assembly including the server-validated
|
||||
# widget registry, so QA parses the same core used by the real panel.
|
||||
parts = []
|
||||
for part in APP_PARTS:
|
||||
if part == "preferences.js":
|
||||
registry = (root / "src/admin/web/dashboard-widgets.json").read_text(encoding="utf-8")
|
||||
parts.append(f"const ADMIN_DASHBOARD_WIDGET_REGISTRY = Object.freeze({registry});")
|
||||
parts.append((root / "src/admin/web/app" / part).read_text(encoding="utf-8"))
|
||||
primary = "\n".join(parts)
|
||||
panel = "\n".join(
|
||||
read_vhosts_js(root) if name == "vhosts.js" else (root / "src/admin/web" / name).read_text(encoding="utf-8")
|
||||
for name in PANEL_PARTS
|
||||
|
||||
Reference in new issue
Block a user