From 41fe97390ceddf945f3d967b8fdb3de4c66b7dea Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Mar 2022 20:02:30 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-9-stable-ee --- app/helpers/projects/cluster_agents_helper.rb | 4 +++- app/helpers/projects/error_tracking_helper.rb | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'app/helpers/projects') diff --git a/app/helpers/projects/cluster_agents_helper.rb b/app/helpers/projects/cluster_agents_helper.rb index 43d520d0eab..c17cb787c9f 100644 --- a/app/helpers/projects/cluster_agents_helper.rb +++ b/app/helpers/projects/cluster_agents_helper.rb @@ -7,7 +7,9 @@ module Projects::ClusterAgentsHelper agent_name: agent_name, can_admin_vulnerability: can?(current_user, :admin_vulnerability, project).to_s, empty_state_svg_path: image_path('illustrations/operations-dashboard_empty.svg'), - project_path: project.full_path + project_path: project.full_path, + kas_address: Gitlab::Kas.external_url, + can_admin_cluster: can?(current_user, :admin_cluster, project).to_s } end end 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 -- cgit v1.2.3