Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
31be226a
Commit
31be226a
authored
Nov 19, 2019
by
Laura Montemayor
Committed by
Clement Ho
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to create new issue from sentry error detail page
parent
600a1a63
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
5 deletions
+34
-5
app/assets/javascripts/error_tracking/components/error_details.vue
...s/javascripts/error_tracking/components/error_details.vue
+7
-3
app/assets/javascripts/error_tracking/details.js
app/assets/javascripts/error_tracking/details.js
+2
-1
app/helpers/projects/error_tracking_helper.rb
app/helpers/projects/error_tracking_helper.rb
+1
-0
changelogs/unreleased/lm-create-new-issue-from-sentry.yml
changelogs/unreleased/lm-create-new-issue-from-sentry.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/error_tracking/components/error_details_spec.js
.../frontend/error_tracking/components/error_details_spec.js
+11
-1
spec/helpers/projects/error_tracking_helper_spec.rb
spec/helpers/projects/error_tracking_helper_spec.rb
+5
-0
No files found.
app/assets/javascripts/error_tracking/components/error_details.vue
View file @
31be226a
...
@@ -32,6 +32,10 @@ export default {
...
@@ -32,6 +32,10 @@ export default {
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
issueProjectPath
:
{
type
:
String
,
required
:
true
,
},
},
},
computed
:
{
computed
:
{
...
mapState
(
'
details
'
,
[
'
error
'
,
'
loading
'
,
'
loadingStacktrace
'
,
'
stacktraceData
'
]),
...
mapState
(
'
details
'
,
[
'
error
'
,
'
loading
'
,
'
loadingStacktrace
'
,
'
stacktraceData
'
]),
...
@@ -82,9 +86,9 @@ export default {
...
@@ -82,9 +86,9 @@ export default {
<div
v-else-if=
"showDetails"
class=
"error-details"
>
<div
v-else-if=
"showDetails"
class=
"error-details"
>
<div
class=
"top-area align-items-center justify-content-between py-3"
>
<div
class=
"top-area align-items-center justify-content-between py-3"
>
<span
v-if=
"!loadingStacktrace && stacktrace"
v-html=
"reported"
></span>
<span
v-if=
"!loadingStacktrace && stacktrace"
v-html=
"reported"
></span>
<
!--
<gl-button
class=
"my-3 ml-auto"
variant=
"success
"
>
<
gl-button
variant=
"success"
:href=
"issueProjectPath
"
>
{{
__
(
'
Create I
ssue
'
)
}}
{{
__
(
'
Create i
ssue
'
)
}}
</gl-button>
--
>
</gl-button
>
</div>
</div>
<div>
<div>
<tooltip-on-truncate
:title=
"error.title"
truncate-target=
"child"
placement=
"top"
>
<tooltip-on-truncate
:title=
"error.title"
truncate-target=
"child"
placement=
"top"
>
...
...
app/assets/javascripts/error_tracking/details.js
View file @
31be226a
...
@@ -12,12 +12,13 @@ export default () => {
...
@@ -12,12 +12,13 @@ export default () => {
store
,
store
,
render
(
createElement
)
{
render
(
createElement
)
{
const
domEl
=
document
.
querySelector
(
this
.
$options
.
el
);
const
domEl
=
document
.
querySelector
(
this
.
$options
.
el
);
const
{
issueDetailsPath
,
issueStackTracePath
}
=
domEl
.
dataset
;
const
{
issueDetailsPath
,
issueStackTracePath
,
issueProjectPath
}
=
domEl
.
dataset
;
return
createElement
(
'
error-details
'
,
{
return
createElement
(
'
error-details
'
,
{
props
:
{
props
:
{
issueDetailsPath
,
issueDetailsPath
,
issueStackTracePath
,
issueStackTracePath
,
issueProjectPath
,
},
},
});
});
},
},
...
...
app/helpers/projects/error_tracking_helper.rb
View file @
31be226a
...
@@ -18,6 +18,7 @@ module Projects::ErrorTrackingHelper
...
@@ -18,6 +18,7 @@ module Projects::ErrorTrackingHelper
opts
=
[
project
,
issue_id
,
{
format: :json
}]
opts
=
[
project
,
issue_id
,
{
format: :json
}]
{
{
'issue-project-path'
=>
new_project_issue_path
(
project
),
'issue-details-path'
=>
details_project_error_tracking_index_path
(
*
opts
),
'issue-details-path'
=>
details_project_error_tracking_index_path
(
*
opts
),
'issue-stack-trace-path'
=>
stack_trace_project_error_tracking_index_path
(
*
opts
)
'issue-stack-trace-path'
=>
stack_trace_project_error_tracking_index_path
(
*
opts
)
}
}
...
...
changelogs/unreleased/lm-create-new-issue-from-sentry.yml
0 → 100644
View file @
31be226a
---
title
:
Add ability to create new issue from sentry error detail page
merge_request
:
20337
author
:
type
:
added
locale/gitlab.pot
View file @
31be226a
...
@@ -4892,6 +4892,9 @@ msgstr ""
...
@@ -4892,6 +4892,9 @@ msgstr ""
msgid "Create group label"
msgid "Create group label"
msgstr ""
msgstr ""
msgid "Create issue"
msgstr ""
msgid "Create lists from labels. Issues with that label appear in that list."
msgid "Create lists from labels. Issues with that label appear in that list."
msgstr ""
msgstr ""
...
...
spec/frontend/error_tracking/components/error_details_spec.js
View file @
31be226a
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
createLocalVue
,
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
GlLoadingIcon
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
Gl
Button
,
Gl
LoadingIcon
,
GlLink
}
from
'
@gitlab/ui
'
;
import
Stacktrace
from
'
~/error_tracking/components/stacktrace.vue
'
;
import
Stacktrace
from
'
~/error_tracking/components/stacktrace.vue
'
;
import
ErrorDetails
from
'
~/error_tracking/components/error_details.vue
'
;
import
ErrorDetails
from
'
~/error_tracking/components/error_details.vue
'
;
...
@@ -20,6 +20,7 @@ describe('ErrorDetails', () => {
...
@@ -20,6 +20,7 @@ describe('ErrorDetails', () => {
propsData
:
{
propsData
:
{
issueDetailsPath
:
'
/123/details
'
,
issueDetailsPath
:
'
/123/details
'
,
issueStackTracePath
:
'
/stacktrace
'
,
issueStackTracePath
:
'
/stacktrace
'
,
issueProjectPath
:
'
/test-project/issues/new
'
,
},
},
});
});
}
}
...
@@ -82,6 +83,15 @@ describe('ErrorDetails', () => {
...
@@ -82,6 +83,15 @@ describe('ErrorDetails', () => {
expect
(
wrapper
.
find
(
Stacktrace
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
Stacktrace
).
exists
()).
toBe
(
false
);
});
});
it
(
'
should allow a blank issue to be created
'
,
()
=>
{
store
.
state
.
details
.
loading
=
false
;
store
.
state
.
details
.
error
.
id
=
1
;
mountComponent
();
const
button
=
wrapper
.
find
(
GlButton
);
expect
(
button
.
exists
()).
toBe
(
true
);
expect
(
button
.
attributes
().
href
).
toBe
(
wrapper
.
props
().
issueProjectPath
);
});
describe
(
'
Stacktrace
'
,
()
=>
{
describe
(
'
Stacktrace
'
,
()
=>
{
it
(
'
should show stacktrace
'
,
()
=>
{
it
(
'
should show stacktrace
'
,
()
=>
{
store
.
state
.
details
.
loading
=
false
;
store
.
state
.
details
.
loading
=
false
;
...
...
spec/helpers/projects/error_tracking_helper_spec.rb
View file @
31be226a
...
@@ -81,6 +81,7 @@ describe Projects::ErrorTrackingHelper do
...
@@ -81,6 +81,7 @@ describe Projects::ErrorTrackingHelper do
let
(
:route_params
)
{
[
project
.
owner
,
project
,
issue_id
,
{
format: :json
}]
}
let
(
:route_params
)
{
[
project
.
owner
,
project
,
issue_id
,
{
format: :json
}]
}
let
(
:details_path
)
{
details_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:details_path
)
{
details_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:stack_trace_path
)
{
stack_trace_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:stack_trace_path
)
{
stack_trace_namespace_project_error_tracking_index_path
(
*
route_params
)
}
let
(
:issue_project_path
)
{
new_project_issue_path
(
project
)
}
let
(
:result
)
{
helper
.
error_details_data
(
project
,
issue_id
)
}
let
(
:result
)
{
helper
.
error_details_data
(
project
,
issue_id
)
}
...
@@ -91,5 +92,9 @@ describe Projects::ErrorTrackingHelper do
...
@@ -91,5 +92,9 @@ describe Projects::ErrorTrackingHelper do
it
'returns the correct stack trace path'
do
it
'returns the correct stack trace path'
do
expect
(
result
[
'issue-stack-trace-path'
]).
to
eq
stack_trace_path
expect
(
result
[
'issue-stack-trace-path'
]).
to
eq
stack_trace_path
end
end
it
'returns the correct path for creating a new issue'
do
expect
(
result
[
'issue-project-path'
]).
to
eq
issue_project_path
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment