File tree Expand file tree Collapse file tree 7 files changed +14
-13
lines changed
redisinsight/ui/src/pages/browser/components Expand file tree Collapse file tree 7 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ module.exports = {
39
39
'json' ,
40
40
] ,
41
41
testEnvironment : 'jest-environment-jsdom' ,
42
- // type: 'module',
43
42
transformIgnorePatterns : [
44
43
'node_modules/(?!(monaco-editor|react-monaco-editor)/)' ,
45
44
] ,
@@ -61,8 +60,5 @@ module.exports = {
61
60
functions : 72 ,
62
61
lines : 80 ,
63
62
} ,
64
- // './redisinsight/ui/src/slices/**/*.ts': {
65
- // statements: 90,
66
- // },
67
63
} ,
68
64
}
Original file line number Diff line number Diff line change 41
41
"start:web" : " cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./configs/webpack.config.web.dev.ts" ,
42
42
"start:web:public" : " cross-env PUBLIC_DEV=true NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./configs/webpack.config.web.dev.ts" ,
43
43
"test" : " jest ./redisinsight/ui -w 1" ,
44
- "test:watch" : " jest ./redisinsight/ui/src/slices/tests/app/context.spec.ts --watch -w 1" ,
44
+ "test:watch" : " jest ./redisinsight/ui --watch -w 1" ,
45
45
"test:cov" : " jest ./redisinsight/ui --silent --coverage --no-cache --forceExit -w 3" ,
46
46
"test:cov:unit" : " jest ./redisinsight/ui --group=-component --coverage -w 1" ,
47
47
"test:cov:component" : " jest ./redisinsight/ui --group=component --coverage -w 1" ,
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ const FilterKeyType = () => {
75
75
setTypeSelected ( value )
76
76
setIsSelectOpen ( false )
77
77
dispatch ( setFilter ( value === ALL_KEY_TYPES_VALUE ? null : value ) )
78
- viewType === KeyViewType . Tree && dispatch ( resetBrowserTree ( ) )
78
+ if ( viewType === KeyViewType . Tree ) {
79
+ dispatch ( resetBrowserTree ( ) )
80
+ }
79
81
dispatch (
80
82
fetchKeys (
81
83
{
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ const KeyTreeSettings = ({ loading }: Props) => {
38
38
const dispatch = useDispatch ( )
39
39
40
40
useEffect ( ( ) => {
41
+ setSorting ( treeViewSort )
41
42
} , [ treeViewSort ] )
42
43
43
44
useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export interface Props {
21
21
onBulkActionsPanel : ( value : boolean ) => void
22
22
}
23
23
24
- const NoKeysMessage = ( props :Props ) => {
24
+ const NoKeysMessage = ( props : Props ) => {
25
25
const {
26
26
total,
27
27
scanned,
Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ const SearchKeyList = () => {
67
67
68
68
dispatch ( setSearchMatch ( match , searchMode ) )
69
69
70
- viewType === KeyViewType . Tree && dispatch ( resetBrowserTree ( ) )
70
+ if ( viewType === KeyViewType . Tree ) {
71
+ dispatch ( resetBrowserTree ( ) )
72
+ }
71
73
72
74
dispatch ( fetchKeys (
73
75
{
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export interface Props {
44
44
}
45
45
46
46
interface OpenedNodes {
47
- [ key : string ] : boolean ;
47
+ [ key : string ] : boolean
48
48
}
49
49
50
50
export const KEYS = 'keys'
@@ -81,7 +81,7 @@ const VirtualTree = (props: Props) => {
81
81
useEffect ( ( ) =>
82
82
( ) => {
83
83
nodes . current = [ ]
84
- elements . current = [ ]
84
+ elements . current = { }
85
85
} , [ ] )
86
86
87
87
// receive result from the "runWebworker"
@@ -90,7 +90,7 @@ const VirtualTree = (props: Props) => {
90
90
return
91
91
}
92
92
93
- elements . current = [ ]
93
+ elements . current = { }
94
94
nodes . current = result
95
95
rerender ( { } )
96
96
setConstructingTree ?.( false )
@@ -99,7 +99,7 @@ const VirtualTree = (props: Props) => {
99
99
useEffect ( ( ) => {
100
100
if ( ! items ?. length ) {
101
101
nodes . current = [ ]
102
- elements . current = [ ]
102
+ elements . current = { }
103
103
rerender ( { } )
104
104
runWebworker ?.( { items : [ ] , delimiter, sorting } )
105
105
return
@@ -161,7 +161,7 @@ const VirtualTree = (props: Props) => {
161
161
162
162
getMetadata ( entries )
163
163
164
- elements . current = [ ]
164
+ elements . current = { }
165
165
} , 100 )
166
166
167
167
const getMetadataNode = useCallback ( ( nameBuffer : any , path : string ) => {
You can’t perform that action at this time.
0 commit comments