-
Notifications
You must be signed in to change notification settings - Fork 415
Description
Preconditions (Any important steps we need to know)
Have a database which is in "NOT CONNECTED" state (e.g. I'm importing it from a file)
Steps to reproduce (How to reproduce what you found step by step)
- Import database from a file
- On main page in "Database List Search" search for a string that should show not show database above (e.g. database with name "redis_abc" and put in searchbox "test")
Actual behavior (A short description of what you found)
Database is still visible on the databases list
Expected behavior (A short description of what you expected to find)
Database is not visible on the databases list
Screenshots (Paste or drag-and-drop a screenshot or a link to a recording)
Additional context (Operating system, version of Redis Insight, Redis database version, Redis module version, database type, connection type, logs, or any other information)
From my debugging it's caused by this line:
RedisInsight/redisinsight/ui/src/pages/home/components/search-databases-list/SearchDatabasesList.tsx
Lines 47 to 50 in 93a7404
| (item.connectionType && | |
| CONNECTION_TYPE_DISPLAY[item.connectionType] | |
| ?.toLowerCase() | |
| ?.indexOf(value) !== -1) || |
During my debugging variables were:
item.connectionType = "NOT CONNECTED"
CONNECTION_TYPE_DISPLAY = {
"STANDALONE": "Standalone",
"CLUSTER": "OSS Cluster",
"SENTINEL": "Sentinel"
}
This causes
CONNECTION_TYPE_DISPLAY[item.connectionType] evaluation to undefined
And overall
item.connectionType &&
CONNECTION_TYPE_DISPLAY[item.connectionType]
?.toLowerCase()
?.indexOf(value) !== -1
to be true
Which causes database to be shown on the list despite fact that it does not contain any value containing searched string