Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-05 20:51:38 +0300
committerPhil Hughes <me@iamphill.com>2017-05-05 20:51:38 +0300
commitb81535351023a3b19870ce052d8c3d0563391686 (patch)
tree0332d42df3b6fb80e752b47121f6a0f4ddb0cf92 /lib
parentc9b246334753c47bef1111bdbfc1a45a1c9b0cfe (diff)
parente5a7ed3ac36aaa1045353e589dae98a29ca72f1e (diff)
Merge branch 'add-sentry-js-again-with-vue' into 'master'
Add sentry JS See merge request !6764
Diffstat (limited to 'lib')
-rw-r--r--lib/api/settings.rb5
-rw-r--r--lib/gitlab/gon_helper.rb2
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/api/settings.rb b/lib/api/settings.rb
index d01c7f2703b..82f513c984e 100644
--- a/lib/api/settings.rb
+++ b/lib/api/settings.rb
@@ -58,6 +58,7 @@ module API
:restricted_visibility_levels,
:send_user_confirmation_email,
:sentry_enabled,
+ :clientside_sentry_enabled,
:session_expire_delay,
:shared_runners_enabled,
:sidekiq_throttling_enabled,
@@ -138,6 +139,10 @@ module API
given sentry_enabled: ->(val) { val } do
requires :sentry_dsn, type: String, desc: 'Sentry Data Source Name'
end
+ optional :clientside_sentry_enabled, type: Boolean, desc: 'Sentry can also be used for reporting and logging clientside exceptions. https://sentry.io/for/javascript/'
+ given clientside_sentry_enabled: ->(val) { val } do
+ requires :clientside_sentry_dsn, type: String, desc: 'Clientside Sentry Data Source Name'
+ end
optional :repository_storage, type: String, desc: 'Storage paths for new projects'
optional :repository_checks_enabled, type: Boolean, desc: "GitLab will periodically run 'git fsck' in all project and wiki repositories to look for silent disk corruption issues."
optional :koding_enabled, type: Boolean, desc: 'Enable Koding'
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index 5ab84266b7d..26473f99bc3 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -10,6 +10,8 @@ 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 = current_application_settings.clientside_sentry_dsn if current_application_settings.clientside_sentry_enabled
+ gon.gitlab_url = Gitlab.config.gitlab.url
if current_user
gon.current_user_id = current_user.id