File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
redisinsight/api/src/modules/browser/utils Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const isClusterCursorValidTests = [
15
15
} ,
16
16
{ input : '172.17.0.1:7001@-1' , expected : true } ,
17
17
{ input : 'domain.com:7001@-1' , expected : true } ,
18
+ { input : 'domain-with-hyphens.com:7001@-1' , expected : true } ,
18
19
{ input : '172.17.0.1:7001@1228822' , expected : true } ,
19
20
{ input : '172.17.0.1:7001@' , expected : false } ,
20
21
{ input : '172.17.0.1:7001@text' , expected : false } ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { IGetNodeKeysResult } from 'src/modules/browser/services/keys-business/s
4
4
const NODES_SEPARATOR = '||' ;
5
5
const CURSOR_SEPARATOR = '@' ;
6
6
// Correct format 172.17.0.1:7001@-1||172.17.0.1:7002@33
7
- const CLUSTER_CURSOR_REGEX = / ^ ( ( [ a - z 0 - 9 . ] ) + : [ 0 - 9 ] + ( @ - ? \d + ) (?: \| { 2 } (? ! $ ) | $ ) ) + $ / ;
7
+ const CLUSTER_CURSOR_REGEX = / ^ ( ( [ a - z 0 - 9 . - ] ) + : [ 0 - 9 ] + ( @ - ? \d + ) (?: \| { 2 } (? ! $ ) | $ ) ) + $ / ;
8
8
9
9
export const isClusterCursorValid = ( cursor ) => CLUSTER_CURSOR_REGEX . test ( cursor ) ;
10
10
You can’t perform that action at this time.
0 commit comments