Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a modern web UI based on React, MaterialUI and Vite #2405

Merged
merged 34 commits into from
Oct 10, 2023
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e674859
Add modern_ui boolean argument
Sep 20, 2023
aee9c3d
Return UIExtraArgOptions as dict
Sep 20, 2023
ce6d231
Modify response from /stats/reset to be json
Sep 20, 2023
b07fab7
Add react frontend
Sep 20, 2023
55fb310
Add dashboard github workflows
Sep 22, 2023
6dcb934
Modify index route to return modern ui when modern_ui=True
Sep 20, 2023
f66665a
Add extend_modern_web_ui
Sep 21, 2023
1788387
Update Makefile
Sep 22, 2023
7048efb
Update Dockerfile
Sep 22, 2023
77a140c
Replace Webpack with Vite
Sep 25, 2023
bc010bd
Add error message to FailuresTable
Sep 25, 2023
08ff63f
Update MANIFEST.in
Sep 25, 2023
8eae174
Update developing-locust.rst
Sep 21, 2023
08aa968
Move dashboard to locust/webui
Sep 25, 2023
58b9d63
Add TestModernWebUi
Sep 25, 2023
5d9eda6
Add run_time to template_args
Sep 25, 2023
c1bb647
Add experimental warning to argument_parser
Sep 26, 2023
4e26d70
Update quickstart.rst
Sep 26, 2023
bac8a15
Fix: autofill user_count with num_users
Sep 27, 2023
4a67676
Fix: fetching report on first load
Sep 27, 2023
98603dd
Fix: StateButttons show new button on spawning state
Sep 27, 2023
018d75e
Fix: swarm spawning does not fetch report
Sep 29, 2023
5508e36
Fix: failures table html escaping
Sep 29, 2023
9e0b43b
Fix: replace lastElement with array.at
Oct 6, 2023
416c5a1
Fix: re-write query string to object
Oct 6, 2023
9585911
Fix: re-write pushQuery
Oct 6, 2023
85e9407
Fix: resize logo.png
Oct 6, 2023
f1b74f1
Remove google fonts
Oct 6, 2023
866e98f
Separate production and dev dependencies
Oct 6, 2023
4bcfaa1
Rename merge to shallowMerge
Oct 6, 2023
c964c65
Use RTK Draft
Oct 6, 2023
c4ffc33
Replace asyncRequest with RTK createApi
Oct 10, 2023
573f363
Fix: promote spawning state to running
Oct 10, 2023
804a19a
Combine ModernUi tests into single test
Oct 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: autofill user_count with num_users
  • Loading branch information
Andrew Baldwin committed Oct 6, 2023
commit bac8a150dc006ffb40768160fd496a2036b7f836
8 changes: 3 additions & 5 deletions locust/webui/src/components/SwarmForm/SwarmForm.tsx
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ interface ISwarmForm
| 'runTime'
| 'showUserclassPicker'
| 'spawnRate'
| 'userCount'
| 'numUsers'
> {}

function SwarmForm({
@@ -52,12 +52,12 @@ function SwarmForm({
host,
extraOptions,
isShape,
numUsers,
overrideHostWarning,
runTime,
setSwarm,
showUserclassPicker,
spawnRate,
userCount,
}: ISwarmForm) {
const onStartSwarm = (inputData: ISwarmFormInput) => {
setSwarm({ state: SWARM_STATE.RUNNING });
@@ -89,7 +89,7 @@ function SwarmForm({
)}

<TextField
defaultValue={(isShape && '-') || userCount || 1}
defaultValue={(isShape && '-') || numUsers || 1}
disabled={!!isShape}
label='Number of users (peak concurrency)'
name='userCount'
@@ -146,7 +146,6 @@ const storeConnector = ({
runTime,
spawnRate,
showUserclassPicker,
userCount,
},
}: IRootState) => ({
availableShapeClasses,
@@ -159,7 +158,6 @@ const storeConnector = ({
numUsers,
runTime,
spawnRate,
userCount,
});

const actionCreator: IDispatchProps = {