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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/helpers/projects
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/helpers/projects')
-rw-r--r--app/helpers/projects/cluster_agents_helper.rb4
-rw-r--r--app/helpers/projects/error_tracking_helper.rb14
2 files changed, 16 insertions, 2 deletions
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