From bc35e14206c31a8599bae5e21d4d0dc4d6517c5f Mon Sep 17 00:00:00 2001 From: agatha197 Date: Fri, 27 Oct 2023 16:51:58 +0900 Subject: [PATCH] feat: add `allow_app_download_panel` to webserver config --- configs/webserver/sample.conf | 2 ++ src/ai/backend/web/config.py | 1 + src/ai/backend/web/templates/config.toml.j2 | 1 + 3 files changed, 4 insertions(+) diff --git a/configs/webserver/sample.conf b/configs/webserver/sample.conf index 5b0f5d8c4a..fabb5de2e2 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 3f267ea176..927a0dac42 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 0a41e31ea2..98b3448bc9 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"] %}