File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
redisinsight/ui/src/pages/browser/components Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -207,14 +207,20 @@ const KeyDetailsHeader = ({
207
207
sendEventTelemetry ( {
208
208
event : getBasedOnViewTypeEvent ( viewType , browserViewEvent , treeViewEvent ) ,
209
209
eventData : {
210
+ length,
210
211
databaseId : instanceId ,
211
212
keyType : type ,
212
- length : enableAutoRefresh ? length : undefined ,
213
- refreshRate : enableAutoRefresh ? + refreshRate : undefined
213
+ refreshRate : + refreshRate
214
214
}
215
215
} )
216
216
}
217
217
218
+ const handleChangeAutoRefreshRate = ( enableAutoRefresh : boolean , refreshRate : string ) => {
219
+ if ( enableAutoRefresh ) {
220
+ handleEnableAutoRefresh ( enableAutoRefresh , refreshRate )
221
+ }
222
+ }
223
+
218
224
const onMouseEnterTTL = ( ) => {
219
225
setTTLIsHovering ( true )
220
226
}
@@ -619,6 +625,7 @@ const KeyDetailsHeader = ({
619
625
containerClassName = { styles . actionBtn }
620
626
onRefresh = { handleRefreshKey }
621
627
onEnableAutoRefresh = { handleEnableAutoRefresh }
628
+ onChangeAutoRefreshRate = { handleChangeAutoRefreshRate }
622
629
testid = "refresh-key-btn"
623
630
/>
624
631
{ keyType && Actions ( width ) }
Original file line number Diff line number Diff line change @@ -139,11 +139,17 @@ const KeysHeader = (props: Props) => {
139
139
event : getBasedOnViewTypeEvent ( viewType , browserViewEvent , treeViewEvent ) ,
140
140
eventData : {
141
141
databaseId : instanceId ,
142
- refreshRate : enableAutoRefresh ? + refreshRate : undefined
142
+ refreshRate : + refreshRate ,
143
143
}
144
144
} )
145
145
}
146
146
147
+ const handleChangeAutoRefreshRate = ( enableAutoRefresh : boolean , refreshRate : string ) => {
148
+ if ( enableAutoRefresh ) {
149
+ handleEnableAutoRefresh ( enableAutoRefresh , refreshRate )
150
+ }
151
+ }
152
+
147
153
const handleScanMore = ( config : any ) => {
148
154
loadMoreItems ?.( {
149
155
...config ,
@@ -250,6 +256,7 @@ const KeysHeader = (props: Props) => {
250
256
containerClassName = { styles . refreshContainer }
251
257
onRefresh = { handleRefreshKeys }
252
258
onEnableAutoRefresh = { handleEnableAutoRefresh }
259
+ onChangeAutoRefreshRate = { handleChangeAutoRefreshRate }
253
260
testid = "refresh-keys-btn"
254
261
/>
255
262
</ div >
You can’t perform that action at this time.
0 commit comments