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
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/projects/error_tracking_helper.rb')
-rw-r--r--app/helpers/projects/error_tracking_helper.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/helpers/projects/error_tracking_helper.rb b/app/helpers/projects/error_tracking_helper.rb
index 5be4f67bde8..471565d162c 100644
--- a/app/helpers/projects/error_tracking_helper.rb
+++ b/app/helpers/projects/error_tracking_helper.rb
@@ -12,7 +12,8 @@ module Projects::ErrorTrackingHelper
'error-tracking-enabled' => error_tracking_enabled.to_s,
'project-path' => project.full_path,
'list-path' => project_error_tracking_index_path(project),
- 'illustration-path' => image_path('illustrations/cluster_popover.svg')
+ 'illustration-path' => image_path('illustrations/cluster_popover.svg'),
+ 'show-integrated-tracking-disabled-alert' => show_integrated_tracking_disabled_alert?(project).to_s
}
end
@@ -27,4 +28,15 @@ module Projects::ErrorTrackingHelper
'issue-stack-trace-path' => stack_trace_project_error_tracking_index_path(*opts)
}
end
+
+ private
+
+ def show_integrated_tracking_disabled_alert?(project)
+ return false if ::Feature.enabled?(:integrated_error_tracking, project)
+
+ setting ||= project.error_tracking_setting ||
+ project.build_error_tracking_setting
+
+ setting.integrated_enabled?
+ end
end