Skip to content

Commit efaa720

Browse files
committed
Revert "- Move queryProfile to parent and create a new telement event on the same."
This reverts commit f770a43.
1 parent 47913b1 commit efaa720

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ export interface Props {
2323
onQueryReRun: (query: string, commandId?: Nullable<string>, executeParams?: CodeButtonParams) => void
2424
onQueryDelete: (commandId: string) => void
2525
onQueryOpen: (commandId: string) => void
26-
onQueryProfile: (query: string, commandId?: Nullable<string>, executeParams?: CodeButtonParams) => void
2726
}
2827
const WBResults = (props: Props) => {
2928
const {
3029
items = [],
3130
activeMode,
3231
activeResultsMode,
3332
onQueryReRun,
34-
onQueryProfile,
3533
onQueryDelete,
3634
onQueryOpen,
3735
scrollDivRef
@@ -93,7 +91,7 @@ const WBResults = (props: Props) => {
9391
onQueryProfile={(profileType: ProfileQueryType) => {
9492
const profileQuery = generateProfileQueryForCommand(command, profileType)
9593
if (profileQuery) {
96-
return onQueryProfile(
94+
return onQueryReRun(
9795
profileQuery,
9896
null,
9997
{ mode, results: resultsMode, clearEditor: false, },

redisinsight/ui/src/pages/workbench/components/wb-results/WBResultsWrapper.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface Props {
1313
onQueryReRun: (query: string, commandId?: Nullable<string>, executeParams?: CodeButtonParams) => void
1414
onQueryOpen: (commandId: string) => void
1515
onQueryDelete: (commandId: string) => void
16-
onQueryProfile: (query: string, commandId?: Nullable<string>, executeParams?: CodeButtonParams) => void
1716
}
1817

1918
const WBResultsWrapper = (props: Props) => (

redisinsight/ui/src/pages/workbench/components/wb-view/WBView/WBView.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ const WBView = (props: Props) => {
117117
onSubmit(query, commandId, executeParams)
118118
}
119119

120-
const handleProfile = (query?: string, commandId?: Nullable<string>, executeParams: CodeButtonParams = {}) => {
121-
sendEventSubmitTelemetry(TelemetryEvent.WORKBENCH_COMMAND_PROFILE, query, executeParams)
122-
onSubmit(query, commandId, executeParams)
123-
}
124-
125120
const sendEventSubmitTelemetry = (
126121
event: TelemetryEvent,
127122
commandInit = script,
@@ -241,7 +236,6 @@ const WBView = (props: Props) => {
241236
activeResultsMode={resultsMode}
242237
scrollDivRef={scrollDivRef}
243238
onQueryReRun={handleReRun}
244-
onQueryProfile={handleProfile}
245239
onQueryOpen={onQueryOpen}
246240
onQueryDelete={onQueryDelete}
247241
/>

redisinsight/ui/src/pages/workbench/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { ProfileQueryType, SEARCH_COMMANDS, GRAPH_COMMANDS } from './constants'
22

3-
export const generateGraphProfileQuery = (query: string, type: ProfileQueryType) => {
3+
export function generateGraphProfileQuery(query: string, type: ProfileQueryType) {
44
return [`graph.${type.toLowerCase()}`, ...query.split(' ').slice(1)].join(' ')
55
}
66

7-
export const generateSearchProfileQuery = (query: string, type: ProfileQueryType) => {
7+
export function generateSearchProfileQuery(query: string, type: ProfileQueryType) {
88
const commandSplit = query.split(' ')
99
const cmd = commandSplit[0]
1010

@@ -18,7 +18,7 @@ export const generateSearchProfileQuery = (query: string, type: ProfileQueryType
1818
}
1919
}
2020

21-
export const generateProfileQueryForCommand = (query: string, type: ProfileQueryType) => {
21+
export function generateProfileQueryForCommand(query: string, type: ProfileQueryType) {
2222
const cmd = query.split(' ')[0].toLowerCase()
2323

2424
if (GRAPH_COMMANDS.includes(cmd)) {

redisinsight/ui/src/telemetry/events.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ export enum TelemetryEvent {
9898

9999
WORKBENCH_COMMAND_COPIED = 'WORKBENCH_COMMAND_COPIED',
100100
WORKBENCH_COMMAND_RUN_AGAIN = 'WORKBENCH_COMMAND_RUN_AGAIN',
101-
WORKBENCH_COMMAND_PROFILE = 'WORKBENCH_COMMAND_PROFILE',
102101
WORKBENCH_COMMAND_DELETE_COMMAND = 'WORKBENCH_COMMAND_DELETE_COMMAND',
103102
WORKBENCH_RESULTS_IN_FULL_SCREEN = 'WORKBENCH_RESULTS_IN_FULL_SCREEN',
104103
WORKBENCH_RESULTS_COLLAPSED = 'WORKBENCH_RESULTS_COLLAPSED',

0 commit comments

Comments
 (0)