From 964124d88395bb356a8facf50775f3450523aa82 Mon Sep 17 00:00:00 2001 From: Andrew Baldwin Date: Fri, 29 Nov 2024 16:25:30 -0500 Subject: [PATCH 1/2] Allow showing info on blank page --- locust/webui/src/pages/Auth.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/locust/webui/src/pages/Auth.tsx b/locust/webui/src/pages/Auth.tsx index 5ef647fbc2..cc66b95f9f 100644 --- a/locust/webui/src/pages/Auth.tsx +++ b/locust/webui/src/pages/Auth.tsx @@ -73,6 +73,9 @@ export default function Auth({ )} + {info && !customForm && !usernamePasswordCallback && ( + {} + )} {authProviders && ( {authProviders.map(({ label, callbackUrl, iconUrl }, index) => ( From 42ba4b0208ea69ed99902a6414f27537f9d42027 Mon Sep 17 00:00:00 2001 From: Andrew Baldwin Date: Fri, 29 Nov 2024 16:31:29 -0500 Subject: [PATCH 2/2] Add option for custom auth title --- locust/web.py | 3 +-- locust/webui/auth.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/locust/web.py b/locust/web.py index 004d85a62b..90c41fcde2 100644 --- a/locust/web.py +++ b/locust/web.py @@ -550,8 +550,7 @@ def login(): self.auth_args["info"] = session.get("auth_info", None) return render_template_from( - "auth.html", - auth_args=self.auth_args, + "auth.html", auth_args=self.auth_args, auth_title=self.auth_args.get("title", "Locust") ) @app_blueprint.route("/user", methods=["POST"]) diff --git a/locust/webui/auth.html b/locust/webui/auth.html index 734a801d73..4f1c727909 100644 --- a/locust/webui/auth.html +++ b/locust/webui/auth.html @@ -7,7 +7,7 @@ - Locust + {{ auth_title | default("Locust") }}