Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
htmlIdGenerator,
EuiLink,
keys,
EuiCallOut,
} from '@elastic/eui'
import { capitalize, isEmpty, pick } from 'lodash'
import ReactDOM from 'react-dom'
Expand Down Expand Up @@ -556,16 +557,6 @@ const AddStandaloneForm = (props: Props) => {
</EuiToolTip>
)

const AppendDbIndex = () => (
<EuiToolTip
anchorClassName="inputAppendIcon"
position="right"
content="Select the Redis logical database to work with in Browser and Workbench."
>
<EuiIcon type="iInCircle" style={{ cursor: 'pointer' }} />
</EuiToolTip>
)

const AppendEndpoints = () => (
<EuiToolTip
title="Host:port"
Expand Down Expand Up @@ -731,18 +722,27 @@ const AddStandaloneForm = (props: Props) => {
<EuiFlexGroup
className={flexGroupClassName}
>
<EuiFlexItem className={flexItemClassName}>
<EuiCallOut>
<EuiText size="s" data-testid="db-index-message">
When the database is added, you can select logical databases only in CLI.
To work with other logical databases in Browser and Workbench, add another database with the same host and port,
but a different database index.
</EuiText>
</EuiCallOut>
</EuiFlexItem>
<EuiFlexItem className={cx(
flexItemClassName,
styles.dbInput,
{ [styles.dbInputBig]: !flexItemClassName }
)}
>
<EuiFormRow label="Database Index" helpText="Should not exceed 15.">
<EuiFormRow label="Select the Redis logical database" helpText="Should not exceed 15.">
<EuiFieldNumber
name="db"
id="db"
data-testid="db"
style={{ width: '100%' }}
style={{ width: 120 }}
placeholder="Enter Database Index"
value={formik.values.db ?? '0'}
maxLength={6}
Expand All @@ -755,7 +755,6 @@ const AddStandaloneForm = (props: Props) => {
type="text"
min={0}
max={MAX_DATABASE_INDEX_NUMBER}
append={<AppendDbIndex />}
/>
</EuiFormRow>
</EuiFlexItem>
Expand Down