mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
chore: Update gunicorn.conf.py to reload extra files based on pages directory
This commit is contained in:
parent
e3e8ac7669
commit
e218ac5947
2 changed files with 15 additions and 5 deletions
|
|
@ -48,9 +48,7 @@ loglevel = "debug" if DEBUG else LOG_LEVEL.lower()
|
|||
|
||||
if DEBUG:
|
||||
reload = True
|
||||
reload_extra_files = [file.as_posix() for file in Path(sep, "usr", "share", "bunkerweb", "ui", "templates").iterdir()] + [
|
||||
file.as_posix() for file in Path(sep, "usr", "share", "bunkerweb", "ui", "pages").iterdir()
|
||||
]
|
||||
reload_extra_files = [file.as_posix() for file in Path(sep, "usr", "share", "bunkerweb", "ui", "pages").glob("*.py")]
|
||||
|
||||
|
||||
def on_starting(server):
|
||||
|
|
|
|||
|
|
@ -305,10 +305,22 @@ def plugins_page():
|
|||
if tmp_ui_path.is_dir():
|
||||
rmtree(tmp_ui_path, ignore_errors=True)
|
||||
|
||||
plugins = current_app.bw_config.get_plugins()
|
||||
db_plugins = current_app.bw_config.get_plugins()
|
||||
plugins = []
|
||||
types = set()
|
||||
|
||||
for plugin in plugins:
|
||||
for plugin in db_plugins:
|
||||
plugins.append(
|
||||
{
|
||||
"name": plugin["id"],
|
||||
"version": plugin["version"],
|
||||
"description": plugin["description"],
|
||||
"type": plugin["type"],
|
||||
"is_deletable": plugin["type"] == "ui",
|
||||
"page": f"/plugins/{plugin['id']}" if plugin["page"] else "",
|
||||
}
|
||||
)
|
||||
|
||||
types.add(plugin["type"])
|
||||
|
||||
builder = plugins_builder(plugins, list(types))
|
||||
|
|
|
|||
Loading…
Reference in a new issue