summaryrefslogtreecommitdiff
path: root/app/helpers/projects
diff options
context:
space:
mode:
authorSimon Knox <simon@gitlab.com>2019-01-11 22:52:26 +0000
committerClement Ho <clemmakesapps@gmail.com>2019-01-11 22:52:26 +0000
commit5a5212542aeac8c3b2e05e853e2e709c7141a999 (patch)
tree9c92bbb6f3c619c69dd225ec32350f59883bba32 /app/helpers/projects
parent6d6c2e95dd8c813a9646c6289589957749bd4b0c (diff)
downloadgitlab-ce-5a5212542aeac8c3b2e05e853e2e709c7141a999.tar.gz
List Sentry Errors in GitLab - Frontend
Diffstat (limited to 'app/helpers/projects')
-rw-r--r--app/helpers/projects/error_tracking_helper.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/projects/error_tracking_helper.rb b/app/helpers/projects/error_tracking_helper.rb
new file mode 100644
index 00000000000..6daf2e21ca2
--- /dev/null
+++ b/app/helpers/projects/error_tracking_helper.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Projects::ErrorTrackingHelper
+ def error_tracking_data(project)
+ error_tracking_enabled = !!project.error_tracking_setting&.enabled?
+
+ {
+ 'index-path' => project_error_tracking_index_path(project,
+ format: :json),
+ 'enable-error-tracking-link' => project_settings_operations_path(project),
+ 'error-tracking-enabled' => error_tracking_enabled.to_s,
+ 'illustration-path' => image_path('illustrations/cluster_popover.svg')
+ }
+ end
+end