From 24fb92521b2c8f0f9ee04e970728a037e9b6faf0 Mon Sep 17 00:00:00 2001 From: Sujin Kim Date: Mon, 30 Oct 2023 14:45:22 +0900 Subject: [PATCH] add: add `allow_app_download_panel` option to webserver config (#1664) --- changes/1664.feature.md | 1 + configs/webserver/sample.conf | 2 ++ src/ai/backend/web/config.py | 1 + src/ai/backend/web/templates/config.toml.j2 | 1 + 4 files changed, 5 insertions(+) create mode 100644 changes/1664.feature.md diff --git a/changes/1664.feature.md b/changes/1664.feature.md new file mode 100644 index 0000000000..6fb503aa7e --- /dev/null +++ b/changes/1664.feature.md @@ -0,0 +1 @@ +Add a `allow_app_download_panel` config to webserver to show/hide the webui app download panel on the summary page. diff --git a/configs/webserver/sample.conf b/configs/webserver/sample.conf index efa9b01436..b94bd05591 100644 --- a/configs/webserver/sample.conf +++ b/configs/webserver/sample.conf @@ -52,6 +52,8 @@ mask_user_info = false # hide_agents = true # URL to download the webui electron app. If blank, https://github.com/lablup/backend.ai-webui/releases/download will be used. # app_download_url = "" +# Allow users to see the panel downloading the webui app from the summary page. +# allow_app_download_panel = true # Enable/disable 2-Factor-Authentication (TOTP). enable_2FA = false # Force enable 2-Factor-Authentication (TOTP). diff --git a/src/ai/backend/web/config.py b/src/ai/backend/web/config.py index 1e58aaebc8..bd32d61341 100644 --- a/src/ai/backend/web/config.py +++ b/src/ai/backend/web/config.py @@ -66,6 +66,7 @@ t.Key("enable_container_commit", default=False): t.ToBool, t.Key("hide_agents", default=True): t.ToBool, t.Key("app_download_url", default=""): t.String(allow_blank=True), + t.Key("allow_app_download_panel", default=True): t.ToBool, t.Key("enable_2FA", default=False): t.ToBool(), t.Key("force_2FA", default=False): t.ToBool(), t.Key("system_SSH_image", default=""): t.String(allow_blank=True), diff --git a/src/ai/backend/web/templates/config.toml.j2 b/src/ai/backend/web/templates/config.toml.j2 index 583d75d932..863b27528c 100644 --- a/src/ai/backend/web/templates/config.toml.j2 +++ b/src/ai/backend/web/templates/config.toml.j2 @@ -21,6 +21,7 @@ connectionMode = "SESSION" {% toml_field "enableContainerCommit" config["service"]["enable_container_commit"] %} {% toml_field "hideAgents" config["service"]["hide_agents"] %} {% toml_field "appDownloadUrl" config["service"]["app_download_url"] %} +{% toml_field "allowAppDownloadPanel" config["service"]["allow_app_download_panel"] %} {% toml_field "enable2FA" config["service"]["enable_2FA"] %} {% toml_field "force2FA" config["service"]["force_2FA"] %} {% toml_field "systemSSHImage" config["service"]["system_SSH_image"] %}