Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
8e8be5d1
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8e8be5d1
编写于
4月 28, 2017
作者:
L
Luke "Jared" Bennett
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed view to correct property
上级
cb4b2e31
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
4 addition
and
32 deletion
+4
-32
app/helpers/sentry_helper.rb
app/helpers/sentry_helper.rb
+0
-6
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+2
-2
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+1
-1
lib/gitlab/gon_helper.rb
lib/gitlab/gon_helper.rb
+1
-1
spec/helpers/sentry_helper_spec.rb
spec/helpers/sentry_helper_spec.rb
+0
-22
未找到文件。
app/helpers/sentry_helper.rb
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
已删除
100644 → 0
浏览文件 @
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录