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

Fix Modern UI - new test modal not scrollable #2577

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion locust/webui/dist/assets/auth-2586839b.js.map

This file was deleted.

1 change: 1 addition & 0 deletions locust/webui/dist/assets/auth-b54b80c4.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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

<title>Locust</title>
<script type="module" crossorigin src="/assets/index-833f9228.js"></script>
<script type="module" crossorigin src="/assets/index-f31faefc.js"></script>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion locust/webui/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" />

<title>Locust</title>
<script type="module" crossorigin src="/assets/index-833f9228.js"></script>
<script type="module" crossorigin src="/assets/index-f31faefc.js"></script>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 2 additions & 1 deletion locust/webui/src/components/Form/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { FormControl, InputLabel, Select as MuiSelect, SelectProps } from '@mui/material';
import { SxProps, FormControl, InputLabel, Select as MuiSelect, SelectProps } from '@mui/material';

interface ISelect extends SelectProps {
label: string;
name: string;
options: string[];
multiple?: boolean;
defaultValue?: string | string[];
sx?: SxProps;
}

export default function Select({
Expand Down
87 changes: 47 additions & 40 deletions locust/webui/src/components/SwarmForm/SwarmUserClassPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,49 +117,56 @@ function SwarmUserClassPicker({
borderRadius: 1,
}}
>
<InputLabel
shrink
<Box
sx={{
position: 'absolute',
backgroundColor: 'background.paper',
width: 'fit-content',
top: '0',
marginTop: '-5px',
padding: '0 5px',
maxHeight: '30vh',
overflow: 'auto',
}}
>
User Classes
</InputLabel>
<FormGroup>
<TableContainer component={Paper}>
<Table>
<TableBody>
{Object.entries(users).map(([name, userClass]) => (
<TableRow hover key={`user-class-${name}`}>
<TableCell onClick={handleToggleUserSelected(name)} padding='checkbox'>
<Checkbox defaultChecked />
</TableCell>

<TableCell>{name}</TableCell>
<TableCell>
<Typography variant='subtitle2'>{userClass.host}</Typography>
</TableCell>
<TableCell align='right'>
<IconButton
onClick={() => {
setOpen(!open);
setUserToEdit({ userClass, userClassName: name });
}}
>
<SettingsIcon />
</IconButton>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
</FormGroup>
<InputLabel
shrink
sx={{
position: 'absolute',
backgroundColor: 'background.paper',
width: 'fit-content',
top: '0',
marginTop: '-5px',
padding: '0 5px',
}}
>
User Classes
</InputLabel>
<FormGroup>
<TableContainer component={Paper}>
<Table>
<TableBody>
{Object.entries(users).map(([name, userClass]) => (
<TableRow hover key={`user-class-${name}`}>
<TableCell onClick={handleToggleUserSelected(name)} padding='checkbox'>
<Checkbox defaultChecked />
</TableCell>

<TableCell>{name}</TableCell>
<TableCell>
<Typography variant='subtitle2'>{userClass.host}</Typography>
</TableCell>
<TableCell align='right'>
<IconButton
onClick={() => {
setOpen(!open);
setUserToEdit({ userClass, userClassName: name });
}}
>
<SettingsIcon />
</IconButton>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
</FormGroup>
</Box>
</Box>
<Modal onClose={() => setOpen(false)} open={open}>
{userToEdit && (
Expand Down
Loading