Skip to content

Commit

Permalink
Merge pull request #3002 from andrewbaldwin44/task/auth-info
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw authored Nov 29, 2024
2 parents de9af6a + 42ba4b0 commit 9ff6e9e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions locust/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion locust/webui/auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />

<title>Locust</title>
<title>{{ auth_title | default("Locust") }}</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 3 additions & 0 deletions locust/webui/src/pages/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export default function Auth({
</Box>
</form>
)}
{info && !customForm && !usernamePasswordCallback && (
<Alert severity='info'>{<Markdown content={info} />}</Alert>
)}
{authProviders && (
<Box sx={{ display: 'flex', flexDirection: 'column', rowGap: 1 }}>
{authProviders.map(({ label, callbackUrl, iconUrl }, index) => (
Expand Down

0 comments on commit 9ff6e9e

Please sign in to comment.