Skip to content

Commit

Permalink
Add run_time to template_args
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Baldwin committed Sep 25, 2023
1 parent 2956155 commit 7573de5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions locust/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ def update_template_args(self):
"stats_history_enabled": options and options.stats_history_enabled,
"tasks": dumps({}),
"extra_options": extra_options,
"run_time": options and options.run_time,
"show_userclass_picker": self.userclass_picker_is_active,
"available_user_classes": available_user_classes,
"available_shape_classes": available_shape_classes,
Expand Down
7 changes: 7 additions & 0 deletions locust/webui/dist/assets/index-b0f93c80.js

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions locust/webui/dist/assets/index-c3bc88fd.js

This file was deleted.

2 changes: 1 addition & 1 deletion locust/webui/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<meta name="theme-color" content="#000000" />

<title>Locust</title>
<script type="module" crossorigin src="/assets/index-c3bc88fd.js"></script>
<script type="module" crossorigin src="/assets/index-b0f93c80.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vendor-f6987cc3.js">
</head>
<body>
Expand Down
5 changes: 5 additions & 0 deletions locust/webui/src/components/SwarmForm/SwarmForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface ISwarmForm
| 'isShape'
| 'host'
| 'overrideHostWarning'
| 'runTime'
| 'showUserclassPicker'
| 'spawnRate'
| 'userCount'
Expand All @@ -52,6 +53,7 @@ function SwarmForm({
extraOptions,
isShape,
overrideHostWarning,
runTime,
setSwarm,
showUserclassPicker,
spawnRate,
Expand Down Expand Up @@ -115,6 +117,7 @@ function SwarmForm({
</AccordionSummary>
<AccordionDetails>
<TextField
defaultValue={runTime}
label='Run time (e.g. 20, 20s, 3m, 2h, 1h20m, 3h30m10s, etc.)'
name='runTime'
sx={{ width: '100%' }}
Expand All @@ -140,6 +143,7 @@ const storeConnector = ({
host,
numUsers,
overrideHostWarning,
runTime,
spawnRate,
showUserclassPicker,
userCount,
Expand All @@ -153,6 +157,7 @@ const storeConnector = ({
overrideHostWarning,
showUserclassPicker,
numUsers,
runTime,
spawnRate,
userCount,
});
Expand Down
1 change: 1 addition & 0 deletions locust/webui/src/redux/slice/swarm.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface ISwarmState {
locustfile: string;
numUsers: number | null;
overrideHostWarning: boolean;
runTime: number;
showUserclassPicker: boolean;
spawnRate: number | null;
state: string;
Expand Down

0 comments on commit 7573de5

Please sign in to comment.