Full-text search and querying is supported for both Hashes and JSON via a secondary index.
+
@@ -58,10 +58,10 @@
PRE-REQUISITES
Follow these instructions to set up the RedisJSON and RediSearch modules on Redis OSS.
- For working with Hashes you will need Redis >=6, RediSearch >=2.0.
+ For working with Hashes you will need Redis >=6,
RediSearch >=2.0.
- For working with JSON you will need Redis >=6, RediSearch >=2.2 and RedisJSON >=2.0.
+ For working with JSON you will need Redis >=6,
RediSearch >=2.2 and
RedisJSON >=2.0.
You could also create a free and ready to use instance on
Redis Cloud.
diff --git a/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/learn-more.html b/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/learn-more.html
new file mode 100644
index 0000000000..3f527f58da
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/learn-more.html
@@ -0,0 +1,56 @@
+
+
+
+
diff --git a/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-hashes.html b/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-hashes.html
index 60c908492c..e82cb95d3c 100644
--- a/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-hashes.html
+++ b/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-hashes.html
@@ -1,6 +1,6 @@
-
! Click on the button, see the command and the comments in the Workbench editor, and then run it.
+
Click on the button, see the command and the comments in the Workbench editor, and then run it.
-
diff --git a/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-json.html b/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-json.html
new file mode 100644
index 0000000000..3d23498dbc
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/guides/document-capabilities/working-with-json.html
@@ -0,0 +1,169 @@
+
+
+
Click on the button, see the command and the comments in the Workbench editor, and then run it.
+
+ -
+
+ CRUD operations
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ Secondary Index
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+ Search and Querying Basics
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-hashes/multiple-tags-or-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-hashes/multiple-tags-or-search.txt
index 942c0a627a..4644cc619f 100644
--- a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-hashes/multiple-tags-or-search.txt
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-hashes/multiple-tags-or-search.txt
@@ -1,4 +1,4 @@
-// Perform a search for documents that have one of multiple tags (OR condition)
+// Perform a search for documents that have one of multiple tags (OR condition)
FT.SEARCH "permits" "@work_type:{construction|design}"
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-and.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-and.txt
new file mode 100644
index 0000000000..e72baa6c0e
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-and.txt
@@ -0,0 +1,19 @@
+// Perform a combined search on two fields (AND): query for intersection of both search terms, a text search and a tag match
+
+FT.SEARCH "schools" "@description:girls @status:{closed}"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-geo-filter.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-geo-filter.txt
new file mode 100644
index 0000000000..83ec2b9109
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-geo-filter.txt
@@ -0,0 +1,19 @@
+// Perform a fuzzy text search and filter on location in a radius distance of 10 miles
+
+FT.SEARCH "schools" "%%gill%%" GEOFILTER location 51.11 0.45 10 mi
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-or.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-or.txt
new file mode 100644
index 0000000000..fa28f448e0
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/combined-search-with-or.txt
@@ -0,0 +1,19 @@
+// Perform a combined search on two fields (OR): query for union of both search terms. The brackets are important.
+
+FT.SEARCH "schools" "(@city:{Oxford})|(@description:girls)"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/create-json-index.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/create-json-index.txt
new file mode 100644
index 0000000000..aa4972fce4
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/create-json-index.txt
@@ -0,0 +1,24 @@
+// It is possible to index either every hash or every JSON document in the keyspace or configure indexing only for a subset of the same data type documents described by a prefix.
+
+// RedisJSON supports JSONPath, so we can easily access and index nested properties and array elements.
+// Note that you cannot index values that contain JSON objects or JSON arrays. To be indexed, a JSONPath expression must return a single scalar value (string or number). If the JSONPath expression returns an object or an array, it will be ignored.
+
+// JSON Strings can only be indexed as TEXT, TAG and GEO (using the right syntax).
+// JSON numbers can only be indexed as NUMERIC.
+// Boolean and NULL values are ignored.
+
+// Command to create an index on JSON keys that are prefixed with "school:"
+
+FT.CREATE schools // Index name
+ on JSON // Indicates the type of data to index
+ PREFIX 1 "school:" // Tells the index which keys it should index
+ SCHEMA
+ $.name AS name TEXT NOSTEM SORTABLE // Will be indexed as a TEXT field. Will permit sorting during query. Stemming is disabled - which is ideal for proper names.
+ $.description AS description TEXT
+ $.school_type AS school_type TAG SEPARATOR ";" // For tag fields, a separator indicates how the text contained in the field is to be split into individual tags
+ $.class AS class TAG // Will be indexed as a tag. Will allow exact-match queries.
+ $.address.street AS address TEXT NOSTEM // '$.address.street' field will be indexed as TEXT and can be referred as 'street' due to the '... AS fieldname ...' construct.
+ $.address.city AS city TAG
+ $.pupils AS pupils NUMERIC SORTABLE // Will be indexed as a numeric field. Will permit sorting during query
+ $.location AS location GEO // Will be indexed as GEO. Will allow geographic range queries
+ $.status_log.[-1] as status TAG // Will index the last element of the array as "status"
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-create.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-create.txt
new file mode 100644
index 0000000000..5904384541
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-create.txt
@@ -0,0 +1,11 @@
+// Let's add four documents as JSON to the index. Note the format of the key names.
+// Each document represents a school.
+
+JSON.SET school:1 . '{"name":"Hall School", "description":"Independent primary school for boys aged 5 to 11","school_type":"single;boys","class":"independent", "address":{"city":"London", "street":"Manor Street"}, "pupils":342, "location":"51.445417, -0.258352", "status_log":["new", "operating"]}'
+
+JSON.SET school:2 . '{"name":"Garden School", "description":"State school for boys and girls aged 5 to 18","school_type":"mixed;boys;girls","class":"state", "address":{"city":"London", "street":"Gordon Street"}, "pupils":1452, "location":"51.402926, -0.321523", "status_log":["new", "operating"]}'
+
+JSON.SET school:3 . '{"name":"Gillford School", "description":"Independent school for girls aged 5 to 18","school_type":"single;girls","class":"private", "address":{"city":"Goudhurst", "street":"Goudhurst"}, "pupils":721, "location":"51.112685, 0.451076", "status_log":["new", "operating", "closed"]}'
+
+JSON.SET school:4 . '{"name":"Old Boys School", "description":"Independent school for boys aged 5 to 18","school_type":"single;boys","class":"independent", "address":{"city":"Oxford", "street":"Trident Street"}, "pupils":1200, "location":"51.781756, -1.123196", "status_log":["new", "operating"]}'
+
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-delete.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-delete.txt
new file mode 100644
index 0000000000..68970feb23
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-delete.txt
@@ -0,0 +1,9 @@
+JSON.GET school:1 $.pupils // Read the pupils field before deletion
+
+JSON.DEL school:1 $.pupils // Delete only the pupils field from the document
+
+JSON.GET school:1 // Read the whole document to confirm the construction_value field has been deleted
+
+JSON.DEL school:1 // Delete the entire document
+
+JSON.GET school:1 // Confirm the entire document has been deleted
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-read.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-read.txt
new file mode 100644
index 0000000000..9af0845a6c
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-read.txt
@@ -0,0 +1,5 @@
+JSON.GET school:1 // Read the whole document
+
+// RedisJSON supports JSONPath, so we can easily access nested properties using $. construct
+
+JSON.GET school:1 $.description // Read only the field description
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-update.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-update.txt
new file mode 100644
index 0000000000..b9cb1e0f19
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/crud-update.txt
@@ -0,0 +1,5 @@
+JSON.GET school:1 $.pupils // Read the pupils field before the update
+
+JSON.SET school:1 $.pupils 430 // Update the pupils field
+
+JSON.GET school:1 $.pupils // Read the pupils field after the update
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/exact-text-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/exact-text-search.txt
new file mode 100644
index 0000000000..64d41fabeb
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/exact-text-search.txt
@@ -0,0 +1,19 @@
+// Perform a text search on all text fields: query for documents inside which the word 'girls' occurs
+
+FT.SEARCH "schools" "girls"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/field-specific-text-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/field-specific-text-search.txt
new file mode 100644
index 0000000000..a30dae9d82
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/field-specific-text-search.txt
@@ -0,0 +1,20 @@
+// Perform a text search on a specific field: query for documents which have a field 'name' inside which the word 'old' occurs
+// To reference a field, use @ construct
+
+FT.SEARCH "schools" "@name:old"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/fuzzy-text-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/fuzzy-text-search.txt
new file mode 100644
index 0000000000..5b3b140140
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/fuzzy-text-search.txt
@@ -0,0 +1,19 @@
+// Perform a Fuzzy text search on all text fields: query for documents with words similar to 'gill'. The number of % indicates the allowed Levenshtein distance. So the query would also match on 'girl' because 'gill' and 'girl' have a distance of two.
+
+FT.SEARCH "schools" "%%gill%%"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/group-and-sort-by-aggregation.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/group-and-sort-by-aggregation.txt
new file mode 100644
index 0000000000..80cbfa4f90
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/group-and-sort-by-aggregation.txt
@@ -0,0 +1,25 @@
+// Aggregations are a way to process the results of a search query, group, sort and transform them - and extract analytic insights from them.
+// Aggregations are represented as the following data processing pipeline:
+// Filter -> Group (Reduce) -> Apply -> Sort -> Apply
+
+// Perform a Group By & Sort By aggregation of your documents: display the number of permits by city and then sort the city alphabetically
+
+FT.AGGREGATE "schools" "*"
+ GROUPBY 1 @city REDUCE COUNT 0 AS nb_of_schools
+ SORTBY 2 @city Asc
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/index-info.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/index-info.txt
new file mode 100644
index 0000000000..40ab37462a
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/index-info.txt
@@ -0,0 +1,5 @@
+// Command to display information about a particular index.
+// In this case display the information about the newly created "schools" index
+
+FT.INFO "schools"
+
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/list-all-indexes.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/list-all-indexes.txt
new file mode 100644
index 0000000000..01a7b83a5b
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/list-all-indexes.txt
@@ -0,0 +1,3 @@
+// Command to return the list of all existing indexes
+
+FT._LIST
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/multiple-tags-and-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/multiple-tags-and-search.txt
new file mode 100644
index 0000000000..f95fbbb128
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/multiple-tags-and-search.txt
@@ -0,0 +1,19 @@
+// Perform a search for documents that all of the tags (AND condition)
+
+FT.SEARCH "schools" "@school_type:{single} @school_type:{girls}"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/multiple-tags-or-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/multiple-tags-or-search.txt
new file mode 100644
index 0000000000..2713ed5863
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/multiple-tags-or-search.txt
@@ -0,0 +1,19 @@
+// Perform a search for documents that have one of multiple tags (OR condition)
+
+FT.SEARCH "schools" "@school_type:{single|girls}"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/numeric-range-query.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/numeric-range-query.txt
new file mode 100644
index 0000000000..91dfb9725d
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/numeric-range-query.txt
@@ -0,0 +1,21 @@
+// Perform a numeric range query: query for every document that has a 'pupils' value between 0 and 1000
+// For numerical ranges, square brackets are inclusive of the listed values
+
+FT.SEARCH "schools" "@pupils:[0,1000]"
+
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+// $.status_log.[-1] as status TAG
diff --git a/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/tag-search.txt b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/tag-search.txt
new file mode 100644
index 0000000000..bb1abaf392
--- /dev/null
+++ b/redisinsight/ui/src/packages/enablement-area/scripts/document-capabilities/working-with-json/tag-search.txt
@@ -0,0 +1,19 @@
+// Perform a tag search: query for documents which have the city field set to "London". Note that we use curly braces around the tag.
+
+FT.SEARCH "schools" "@city:{Oxford}"
+
+// See the "schools" index schema for reference
+
+// FT.CREATE schools
+// on JSON
+// PREFIX 1 "school:"
+// SCHEMA
+// $.name AS name TEXT NOSTEM SORTABLE
+// $.description AS description TEXT
+// $.school_type AS school_type TAG SEPARATOR ";"
+// $.class AS class TAG
+// $.address.street AS address TEXT NOSTEM
+// $.address.city AS city TAG
+// $.pupils AS pupils NUMERIC SORTABLE
+// $.location AS location GEO
+//
diff --git a/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx b/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx
index 42a9086bd0..57d956852d 100644
--- a/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx
+++ b/redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx
@@ -120,6 +120,7 @@ const TableInfoResult = React.memo((props: Props) => {
className={cx('inMemoryTableDefault', 'tableInfo', {
tableWithPagination: result?.length > 10,
})}
+ responsive={false}
data-testid={`query-table-result-${query}`}
/>
{Footer()}
diff --git a/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx b/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx
index b497a0adfa..1d115634d0 100644
--- a/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx
+++ b/redisinsight/ui/src/packages/redisearch/src/components/TableResult/TableResult.tsx
@@ -117,6 +117,7 @@ const TableResult = React.memo((props: Props) => {
tableWithPagination: result?.length > 10,
}
)}
+ responsive={false}
data-testid={`query-table-result-${query}`}
/>
)}
diff --git a/redisinsight/ui/src/pages/browser/components/list-details/ListDetails.tsx b/redisinsight/ui/src/pages/browser/components/list-details/ListDetails.tsx
index e6a4ab0c01..7f216c5cc2 100644
--- a/redisinsight/ui/src/pages/browser/components/list-details/ListDetails.tsx
+++ b/redisinsight/ui/src/pages/browser/components/list-details/ListDetails.tsx
@@ -2,7 +2,7 @@ import { EuiButtonIcon, EuiText, EuiToolTip } from '@elastic/eui'
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import cx from 'classnames'
-import { isNull } from 'lodash'
+import { isEqual, isNull } from 'lodash'
import { SCAN_COUNT_DEFAULT } from 'uiSrc/constants/api'
import {
@@ -66,10 +66,16 @@ const ListDetails = (props: Props) => {
}, [loadedElements])
const handleEditElement = (index = 0, editing: boolean) => {
- const elems = [...elements]
- elems[index].editing = editing
-
- setElements(elems)
+ const newElemsState = elements.map((item) => {
+ if (item.index === index) {
+ return { ...item, editing }
+ }
+ return item
+ })
+
+ if (!isEqual(elements, newElemsState)) {
+ setElements(newElemsState)
+ }
}
const handleApplyEditElement = (index = 0, element: string) => {
diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss
index 1172ecc8c5..466d660140 100644
--- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss
+++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss
@@ -34,6 +34,10 @@
.euiListGroupItem {
button {
padding: 3px 8px;
+ line-height: 24px;
+ }
+ .euiListGroupItem__label {
+ line-height: 20px;
}
}
}
diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/InternalLink.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/InternalLink.tsx
index 06f32ca0dd..328c24dad4 100644
--- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/InternalLink.tsx
+++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/InternalLink.tsx
@@ -4,6 +4,7 @@ import cx from 'classnames'
import EnablementAreaContext from 'uiSrc/pages/workbench/contexts/enablementAreaContext'
import styles from './styles.module.scss'
+import './styles.scss'
export interface Props {
testId: string,
diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/styles.scss b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/styles.scss
new file mode 100644
index 0000000000..f1b7d39490
--- /dev/null
+++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalLink/styles.scss
@@ -0,0 +1,3 @@
+.euiListGroupItem--xSmall .euiListGroupItem__label {
+ line-height: 12px;
+}
diff --git a/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx b/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx
index b70b04bc16..504d61728c 100644
--- a/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx
+++ b/redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx
@@ -79,7 +79,7 @@ const WBView = (props: Props) => {
{ isCollapsed.current = !isCollapsed.current }}
@@ -92,11 +92,12 @@ const WBView = (props: Props) => {
data-test-subj="resize-btn-preselects-area"
/>
{(EuiResizablePanel, EuiResizableButton) => (
@@ -106,6 +107,7 @@ const WBView = (props: Props) => {
minSize="140px"
paddingSize="none"
scrollable={false}
+ className={styles.queryPanel}
initialSize={vertical[verticalPanelIds.firstPanelId] ?? 20}
style={{ minHeight: '140px' }}
>
@@ -129,7 +131,9 @@ const WBView = (props: Props) => {
paddingSize="none"
scrollable={false}
initialSize={vertical[verticalPanelIds.secondPanelId] ?? 80}
- className={styles.queryResults}
+ className={cx(styles.queryResults, styles.queryResultsPanel)}
+ // Fix scroll on low height - 140px (queryPanel)
+ style={{ maxHeight: 'calc(100% - 140px)' }}
>
{
- state.data.elements[payload.index] = payload.element
+ state.data.elements[state.data.elements.length === 1 ? 0 : payload.index] = payload.element
},
insertListElements: (state) => {
state.loading = true
diff --git a/redisinsight/ui/src/utils/commands.ts b/redisinsight/ui/src/utils/commands.ts
index 1053257a98..0a9006af89 100644
--- a/redisinsight/ui/src/utils/commands.ts
+++ b/redisinsight/ui/src/utils/commands.ts
@@ -49,26 +49,30 @@ export const generateArgsNames = (
isEmpty
)
+const getExternalCommandFormat = (commandName = '') =>
+ commandName
+ .replace(/\s+/g, '_')
+ .replace(/[.]+/g, '')
+ .toLowerCase()
+
export const getDocUrlForCommand = (
commandName: string,
commandGroup: CommandGroup | string = CommandGroup.Generic
): string => {
- let commandPage = ''
+ let command = getExternalCommandFormat(commandName)
switch (commandGroup) {
case CommandGroup.Search:
- commandPage = commandName
- .replace(/\s+/g, '_')
- .replace(/[.]+/g, '')
- .toLowerCase()
- return `https://oss.redis.com/redisearch/Commands/#${commandPage}`
+ return `https://oss.redis.com/redisearch/Commands/#${command}`
case CommandGroup.JSON:
- commandPage = commandName
- .replace(/\s+/g, '_')
- .replace(/[.]+/g, '')
- .toLowerCase()
- return `https://oss.redis.com/redisjson/commands/#${commandPage}`
+ return `https://oss.redis.com/redisjson/commands/#${command}`
+ case CommandGroup.TimeSeries:
+ return `https://oss.redis.com/redistimeseries/commands/#${command}`
+ case CommandGroup.Graph:
+ return `https://oss.redis.com/redisgraph/commands/#${command}`
+ case CommandGroup.AI:
+ return `https://oss.redis.com/redisai/commands/#${command}`
default:
- commandPage = commandName.replace(/\s+/g, '-').toLowerCase()
- return `https://redis.io/commands/${commandPage}`
+ command = commandName.replace(/\s+/g, '-').toLowerCase()
+ return `https://redis.io/commands/${command}`
}
}
diff --git a/redisinsight/ui/src/utils/tests/commands.spec.ts b/redisinsight/ui/src/utils/tests/commands.spec.ts
index 06671e18f4..4ae9286224 100644
--- a/redisinsight/ui/src/utils/tests/commands.spec.ts
+++ b/redisinsight/ui/src/utils/tests/commands.spec.ts
@@ -192,6 +192,12 @@ const getDocUrlForCommandTests: any[] = [
['JSON.GET', CommandGroup.JSON, 'https://oss.redis.com/redisjson/commands/#jsonget'],
['FT.CREATE', CommandGroup.Search, 'https://oss.redis.com/redisearch/Commands/#ftcreate'],
['FT.ALTER SCHEMA ADD', CommandGroup.Search, 'https://oss.redis.com/redisearch/Commands/#ftalter_schema_add'],
+ ['TS.ADD', CommandGroup.TimeSeries, 'https://oss.redis.com/redistimeseries/commands/#tsadd'],
+ ['TS.CREATE', CommandGroup.TimeSeries, 'https://oss.redis.com/redistimeseries/commands/#tscreate'],
+ ['GRAPH.EXPLAIN', CommandGroup.Graph, 'https://oss.redis.com/redisgraph/commands/#graphexplain'],
+ ['GRAPH.QUERY', CommandGroup.Graph, 'https://oss.redis.com/redisgraph/commands/#graphquery'],
+ ['AI.MODELRUN', CommandGroup.AI, 'https://oss.redis.com/redisai/commands/#aimodelrun'],
+ ['AI.SCRIPTDEL', CommandGroup.AI, 'https://oss.redis.com/redisai/commands/#aiscriptdel'],
['NON EXIST COMMAND', 'non-exist', 'https://redis.io/commands/non-exist-command'],
]
diff --git a/tests/e2e/package.json b/tests/e2e/package.json
index 6cba7ae7d5..b8ab6b5e88 100644
--- a/tests/e2e/package.json
+++ b/tests/e2e/package.json
@@ -7,6 +7,8 @@
"test:live": "testcafe --live chrome ",
"start:api": "cross-env SERVER_STATIC_CONTENT=true yarn --cwd ../../redisinsight/api start:prod",
"build:api": "yarn --cwd ../../redisinsight/api build:prod",
+ "build:statics": "yarn --cwd ../../ build:statics",
+ "build:statics:win": "yarn --cwd ../../ build:statics:win",
"build:web": "yarn --cwd ../../ build:web",
"redis:last": "docker run --name redis-last-version -p 7777:6379 -d redislabs/redismod",
"start:app": "cross-env SERVER_STATIC_CONTENT=true yarn start:api",