Skip to content

Commit 84c745b

Browse files
authored
Merge pull request #462 from RedisInsight/feature/RI-2390
#RI-2390 - rework tooltip about db index
2 parents 55937b0 + ae23239 commit 84c745b

File tree

1 file changed

+12
-13
lines changed
  • redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceForm

1 file changed

+12
-13
lines changed

redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceForm/InstanceForm.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
htmlIdGenerator,
2424
EuiLink,
2525
keys,
26+
EuiCallOut,
2627
} from '@elastic/eui'
2728
import { capitalize, isEmpty, pick } from 'lodash'
2829
import ReactDOM from 'react-dom'
@@ -556,16 +557,6 @@ const AddStandaloneForm = (props: Props) => {
556557
</EuiToolTip>
557558
)
558559

559-
const AppendDbIndex = () => (
560-
<EuiToolTip
561-
anchorClassName="inputAppendIcon"
562-
position="right"
563-
content="Select the Redis logical database to work with in Browser and Workbench."
564-
>
565-
<EuiIcon type="iInCircle" style={{ cursor: 'pointer' }} />
566-
</EuiToolTip>
567-
)
568-
569560
const AppendEndpoints = () => (
570561
<EuiToolTip
571562
title="Host:port"
@@ -731,18 +722,27 @@ const AddStandaloneForm = (props: Props) => {
731722
<EuiFlexGroup
732723
className={flexGroupClassName}
733724
>
725+
<EuiFlexItem className={flexItemClassName}>
726+
<EuiCallOut>
727+
<EuiText size="s" data-testid="db-index-message">
728+
When the database is added, you can select logical databases only in CLI.
729+
To work with other logical databases in Browser and Workbench, add another database with the same host and port,
730+
but a different database index.
731+
</EuiText>
732+
</EuiCallOut>
733+
</EuiFlexItem>
734734
<EuiFlexItem className={cx(
735735
flexItemClassName,
736736
styles.dbInput,
737737
{ [styles.dbInputBig]: !flexItemClassName }
738738
)}
739739
>
740-
<EuiFormRow label="Database Index" helpText="Should not exceed 15.">
740+
<EuiFormRow label="Select the Redis logical database" helpText="Should not exceed 15.">
741741
<EuiFieldNumber
742742
name="db"
743743
id="db"
744744
data-testid="db"
745-
style={{ width: '100%' }}
745+
style={{ width: 120 }}
746746
placeholder="Enter Database Index"
747747
value={formik.values.db ?? '0'}
748748
maxLength={6}
@@ -755,7 +755,6 @@ const AddStandaloneForm = (props: Props) => {
755755
type="text"
756756
min={0}
757757
max={MAX_DATABASE_INDEX_NUMBER}
758-
append={<AppendDbIndex />}
759758
/>
760759
</EuiFormRow>
761760
</EuiFlexItem>

0 commit comments

Comments
 (0)