Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mysql-query-profiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erlend Ydse
mysql-query-profiler
Commits
a597ff4f
Commit
a597ff4f
authored
4 years ago
by
Erlend Ydse
Browse files
Options
Downloads
Patches
Plain Diff
Fix errorview not showing up on error
parent
30cd1506
Branches
issue-10-fxmapcontrol
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/components/QueryRecorder.tsx
+3
-9
3 additions, 9 deletions
app/components/QueryRecorder.tsx
app/types/Recording.ts
+1
-1
1 addition, 1 deletion
app/types/Recording.ts
backend/recorder/SqlManager.ts
+3
-6
3 additions, 6 deletions
backend/recorder/SqlManager.ts
with
7 additions
and
16 deletions
app/components/QueryRecorder.tsx
+
3
−
9
View file @
a597ff4f
...
...
@@ -138,15 +138,7 @@ export default function QueryRecorder() {
);
const
t1
=
performance
.
now
();
setRecordingTime
(
t1
-
t0
);
if
(
result
.
error
===
'
cancelled
'
)
{
updateContext
(
result
,
t1
-
t0
,
recordingLabel
,
recordingColor
,
'
Query was cancelled
'
);
}
else
if
(
result
?.
error
)
{
if
(
result
?.
error
)
{
let
error
;
if
(
result
.
error
?.
info
)
{
const
errorcode
=
JSON
.
stringify
(
...
...
@@ -160,6 +152,8 @@ export default function QueryRecorder() {
2
);
error
=
`Errorcode:
${
errorcode
}
\n
${
errormsg
}
`
;
}
else
if
(
result
.
error
===
'
cancelled
'
)
{
error
=
'
Query was cancelled
'
;
}
else
{
error
=
String
(
result
.
error
);
}
...
...
This diff is collapsed.
Click to expand it.
app/types/Recording.ts
+
1
−
1
View file @
a597ff4f
...
...
@@ -12,7 +12,7 @@ export interface Recording {
optimizerTrace
?:
ResultValue
[][];
queryOutput
?:
QueryOutput
;
explainAnalyze
:
boolean
;
explainAnalyzeTree
:
ExplainAnalyzeNode
;
explainAnalyzeTree
?
:
ExplainAnalyzeNode
;
error
?:
string
;
label
:
string
;
// On both in order to avoid having to create an 'activeRecordingListItem'
uuid
:
string
;
...
...
This diff is collapsed.
Click to expand it.
backend/recorder/SqlManager.ts
+
3
−
6
View file @
a597ff4f
...
...
@@ -108,16 +108,13 @@ export default class SqlManager {
if
(
result
?.
error
)
{
stateCallback
?.
call
(
undefined
,
'
Error detected, aborting monitoring
'
);
await
this
.
reset
();
stateCallback
?.
call
(
undefined
,
'
Getting optimizer trace
'
);
const
optimizerTrace
=
await
this
.
runner
.
getOptimizerTrace
();
stateCallback
?.
call
(
undefined
,
''
);
return
{
result
,
optimizerTrace
:
DataProcessor
.
processOptimizerTrace
(
optimizerTrace
.
results
),
error
:
result
.
error
,
explainAnalyze
:
DataProcessor
.
processExplainAnalyze
(
result
.
results
),
explainAnalyze
:
result
.
results
?
DataProcessor
.
processExplainAnalyze
(
result
.
results
)
:
undefined
,
};
}
stateCallback
?.
call
(
undefined
,
'
Getting optimizer trace
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment