BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8e8be5d1
Unverified
Commit
8e8be5d1
authored
Apr 28, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed view to correct property
parent
cb4b2e31
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
32 deletions
+4
-32
sentry_helper.rb
app/helpers/sentry_helper.rb
+0
-6
_form.html.haml
app/views/admin/application_settings/_form.html.haml
+2
-2
_head.html.haml
app/views/layouts/_head.html.haml
+1
-1
gon_helper.rb
lib/gitlab/gon_helper.rb
+1
-1
sentry_helper_spec.rb
spec/helpers/sentry_helper_spec.rb
+0
-22
No files found.
app/helpers/sentry_helper.rb
View file @
8e8be5d1
...
...
@@ -6,10 +6,4 @@ module SentryHelper
def
sentry_context
Gitlab
::
Sentry
.
context
(
current_user
)
end
def
clientside_sentry_enabled?
current_application_settings
.
clientside_sentry_enabled
end
delegate
:clientside_sentry_dsn
,
to: :current_application_settings
end
app/views/admin/application_settings/_form.html.haml
View file @
8e8be5d1
...
...
@@ -422,9 +422,9 @@
%a
{
href:
'https://sentry.io/for/javascript/'
,
target:
'_blank'
,
rel:
'noopener noreferrer'
}
https://sentry.io/for/javascript/
.form-group
=
f
.
label
:
sentry_dsn
,
'
Sentry DSN'
,
class:
'control-label col-sm-2'
=
f
.
label
:
clientside_sentry_dsn
,
'Clientside
Sentry DSN'
,
class:
'control-label col-sm-2'
.col-sm-10
=
f
.
text_field
:sentry_dsn
,
class:
'form-control'
=
f
.
text_field
:
clientside_
sentry_dsn
,
class:
'form-control'
%fieldset
%legend
Repository Storage
...
...
app/views/layouts/_head.html.haml
View file @
8e8be5d1
...
...
@@ -33,7 +33,7 @@
=
webpack_bundle_tag
"runtime"
=
webpack_bundle_tag
"common"
=
webpack_bundle_tag
"main"
=
webpack_bundle_tag
"raven"
if
clientside_sentry_enabled?
=
webpack_bundle_tag
"raven"
if
Gitlab
.
config
.
clientside_sentry_enabled
-
if
content_for?
(
:page_specific_javascripts
)
=
yield
:page_specific_javascripts
...
...
lib/gitlab/gon_helper.rb
View file @
8e8be5d1
...
...
@@ -12,7 +12,7 @@ module Gitlab
gon
.
user_color_scheme
=
Gitlab
::
ColorSchemes
.
for_user
(
current_user
).
css_class
gon
.
katex_css_url
=
ActionController
::
Base
.
helpers
.
asset_path
(
'katex.css'
)
gon
.
katex_js_url
=
ActionController
::
Base
.
helpers
.
asset_path
(
'katex.js'
)
gon
.
sentry_dsn
=
Gitlab
.
config
.
clientside_sentry_dsn
if
clientside_sentry_enabled?
gon
.
sentry_dsn
=
Gitlab
.
config
.
clientside_sentry_dsn
if
Gitlab
.
config
.
clientside_sentry_enabled
gon
.
gitlab_url
=
Gitlab
.
config
.
gitlab
.
url
gon
.
is_production
=
Rails
.
env
.
production?
...
...
spec/helpers/sentry_helper_spec.rb
deleted
100644 → 0
View file @
cb4b2e31
require
'spec_helper'
describe
SentryHelper
do
describe
'#sentry_dsn_public'
do
it
'returns nil if no sentry_dsn is set'
do
mock_sentry_dsn
(
nil
)
expect
(
helper
.
sentry_dsn_public
).
to
eq
nil
end
it
'returns the uri string with no password if sentry_dsn is set'
do
mock_sentry_dsn
(
'https://test:dsn@host/path'
)
expect
(
helper
.
sentry_dsn_public
).
to
eq
'https://test@host/path'
end
end
def
mock_sentry_dsn
(
value
)
allow_message_expectations_on_nil
allow
(
ApplicationSetting
.
current
).
to
receive
(
:sentry_dsn
).
and_return
(
value
)
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