Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
42
Issues
42
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
f4122bbc
Commit
f4122bbc
authored
Oct 10, 2018
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sentry: deal with sentry's js as external resource
parent
bdd84277
Pipeline
#1557
passed with stage
in 7 minutes and 59 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
core/static/core/js/sentry/bundle.min.js
core/static/core/js/sentry/bundle.min.js
+3
-0
core/templates/core/500.jinja
core/templates/core/500.jinja
+6
-2
core/views/__init__.py
core/views/__init__.py
+0
-1
No files found.
core/static/core/js/sentry/bundle.min.js
0 → 100644
View file @
f4122bbc
This diff is collapsed.
Click to expand it.
core/templates/core/500.jinja
View file @
f4122bbc
{%
extends
"core/base.jinja"
%}
{%
extends
"core/base.jinja"
%}
{%
block
head
%}
{%
block
head
%}
{{
super
()
}}
{{
super
()
}}
<script
src=
"https://browser.sentry-cdn.com/4.0.6/bundle.min.js"
crossorigin=
"anonymous"
></script>
{%
if
settings.EXTERNAL_RES
%}
<script
src=
"https://browser.sentry-cdn.com/4.0.6/bundle.min.js"
crossorigin=
"anonymous"
></script>
{%
else
%}
<script
src=
"
{{
static
(
'core/js/sentry/bundle.min.js'
)
}}
"
crossorigin=
"anonymous"
></script>
{%
endif
%}
{%
endblock
head
%}
{%
endblock
head
%}
{%
block
content
%}
{%
block
content
%}
<h3>
{%
trans
%}
500, Server Error
{%
endtrans
%}
</h3>
<h3>
{%
trans
%}
500, Server Error
{%
endtrans
%}
</h3>
{%
if
request.sentry_dsn
%}
{%
if
settings.SENTRY_DSN
%}
<script>
<script>
Sentry
.
init
({
dsn
:
'
{{
request.sentry_dsn
}}
'
});
Sentry
.
init
({
dsn
:
'
{{
request.sentry_dsn
}}
'
});
Sentry
.
showReportDialog
({
eventId
:
'
{{
request.sentry_last_event_id
()
}}
'
})
Sentry
.
showReportDialog
({
eventId
:
'
{{
request.sentry_last_event_id
()
}}
'
})
...
...
core/views/__init__.py
View file @
f4122bbc
...
@@ -72,7 +72,6 @@ def not_found(request):
...
@@ -72,7 +72,6 @@ def not_found(request):
def
internal_servor_error
(
request
):
def
internal_servor_error
(
request
):
request
.
sentry_dsn
=
settings
.
SENTRY_DSN
request
.
sentry_last_event_id
=
last_event_id
request
.
sentry_last_event_id
=
last_event_id
return
HttpResponseServerError
(
render
(
request
,
"core/500.jinja"
))
return
HttpResponseServerError
(
render
(
request
,
"core/500.jinja"
))
...
...
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