Skip to content

Commit 3d3d102

Browse files
authored
Merge pull request #1736 from RedisInsight/fe/bugfix-RI-3726_profile_explain_RI-4187
[RI-4187] PROFILE/EXPLAIN - Fix Query Card plugin button
2 parents 3109fce + 402dfd4 commit 3d3d102

File tree

1 file changed

+9
-2
lines changed
  • redisinsight/ui/src/pages/workbench/components/wb-results/WBResults

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ const WBResults = (props: Props) => {
5252
</div>
5353
)
5454

55-
const handleQueryProfile = (profileType: ProfileQueryType) => {
55+
const handleQueryProfile = (
56+
profileType: ProfileQueryType,
57+
commandExecution: { command: string, mode?: RunQueryMode, resultsMode?: ResultsMode }
58+
) => {
59+
const { command, mode, resultsMode } = commandExecution
5660
const profileQuery = generateProfileQueryForCommand(command, profileType)
5761
if (profileQuery) {
5862
onQueryProfile(
@@ -101,7 +105,10 @@ const WBResults = (props: Props) => {
101105
resultsMode={resultsMode}
102106
db={db}
103107
onQueryOpen={() => onQueryOpen(id)}
104-
onQueryProfile={handleQueryProfile}
108+
onQueryProfile={(profileType) => handleQueryProfile(
109+
profileType,
110+
{ command, mode, resultsMode },
111+
)}
105112
onQueryReRun={() => onQueryReRun(
106113
command,
107114
null,

0 commit comments

Comments
 (0)