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 @@ -212,14 +212,20 @@ const KeyDetailsHeader = ({
212
212
sendEventTelemetry ( {
213
213
event : getBasedOnViewTypeEvent ( viewType , browserViewEvent , treeViewEvent ) ,
214
214
eventData : {
215
+ length,
215
216
databaseId : instanceId ,
216
217
keyType : type ,
217
- length : enableAutoRefresh ? length : undefined ,
218
- refreshRate : enableAutoRefresh ? + refreshRate : undefined
218
+ refreshRate : + refreshRate
219
219
}
220
220
} )
221
221
}
222
222
223
+ const handleChangeAutoRefreshRate = ( enableAutoRefresh : boolean , refreshRate : string ) => {
224
+ if ( enableAutoRefresh ) {
225
+ handleEnableAutoRefresh ( enableAutoRefresh , refreshRate )
226
+ }
227
+ }
228
+
223
229
const onMouseEnterTTL = ( ) => {
224
230
setTTLIsHovering ( true )
225
231
}
@@ -624,6 +630,7 @@ const KeyDetailsHeader = ({
624
630
containerClassName = { styles . actionBtn }
625
631
onRefresh = { handleRefreshKey }
626
632
onEnableAutoRefresh = { handleEnableAutoRefresh }
633
+ onChangeAutoRefreshRate = { handleChangeAutoRefreshRate }
627
634
testid = "refresh-key-btn"
628
635
/>
629
636
{ 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