File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
SqlLab/components/SouthPane Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ import Icons from 'src/components/Icons';
2929import { SqlLabRootState } from 'src/SqlLab/types' ;
3030import { useExtensionsContext } from 'src/extensions/ExtensionsContext' ;
3131import ExtensionsManager from 'src/extensions/ExtensionsManager' ;
32+ import useLogAction from 'src/logger/useLogAction' ;
33+ import { LOG_ACTIONS_SQLLAB_SWITCH_SOUTH_PANE_TAB } from 'src/logger/LogUtils' ;
3234import QueryHistory from '../QueryHistory' ;
3335import {
3436 STATUS_OPTIONS ,
@@ -128,8 +130,10 @@ const SouthPane = ({
128130 ) ;
129131 const innerTabContentHeight = height - TAB_HEIGHT ;
130132 const southPaneRef = createRef < HTMLDivElement > ( ) ;
133+ const logAction = useLogAction ( { sqlEditorId : queryEditorId } ) ;
131134 const switchTab = ( id : string ) => {
132135 dispatch ( setActiveSouthPaneTab ( id ) ) ;
136+ logAction ( LOG_ACTIONS_SQLLAB_SWITCH_SOUTH_PANE_TAB , { tab : id } ) ;
133137 } ;
134138 const removeTable = useCallback (
135139 ( key , action ) => {
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ export const LOG_ACTIONS_SQLLAB_COPY_RESULT_TO_CLIPBOARD =
8585 'sqllab_copy_result_to_clipboard' ;
8686export const LOG_ACTIONS_SQLLAB_CREATE_CHART = 'sqllab_create_chart' ;
8787export const LOG_ACTIONS_SQLLAB_LOAD_TAB_STATE = 'sqllab_load_tab_state' ;
88+ export const LOG_ACTIONS_SQLLAB_SWITCH_SOUTH_PANE_TAB =
89+ 'sqllab_switch_south_pane_tab' ;
8890
8991// Log event types --------------------------------------------------------------
9092export const LOG_EVENT_TYPE_TIMING = new Set ( [
You can’t perform that action at this time.
0 commit comments