Skip to content

Commit

Permalink
Change: Use drop-down for SMB max version
Browse files Browse the repository at this point in the history
Instead of using a text field for the SMB alert max version, a
drop-down selection is used in the create/edit dialog.

This makes the dialog easier to use by limiting it to valid
inputs.
  • Loading branch information
timopollmeier committed Apr 5, 2023
1 parent 396d1ab commit 7c25710
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/web/pages/alerts/smbmethodpart.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ import TextField from 'web/components/form/textfield';

import NewIcon from 'web/components/icon/newicon';

const smbMaxProtocolItems = [
{label: _('Default'), value: ''},
{label: 'NT1', value: 'NT1'},
{label: 'SMB2', value: 'SMB2'},
{label: 'SMB3', value: 'SMB3'},
];

const SmbMethodPart = ({
prefix,
credentials = [],
Expand Down Expand Up @@ -111,8 +118,9 @@ const SmbMethodPart = ({
</FormGroup>

<FormGroup title={_('Max Protocol')}>
<TextField
<Select
name={prefix + 'smb_max_protocol'}
items={smbMaxProtocolItems}
value={smbMaxProtocol}
onChange={onChange}
/>
Expand Down

0 comments on commit 7c25710

Please sign in to comment.