diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 03:08:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 03:08:35 +0300 |
commit | 16210ba9db55eeb1cd4c83c8a679ad4e97dd3d48 (patch) | |
tree | efd0bd7c3fdf6f3ebb291d2e3aef86dca453b950 /app/helpers | |
parent | 1b16af5ff9da84ff7779ea7d7db977d7c056baca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects/alert_management_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/projects/alert_management_helper.rb b/app/helpers/projects/alert_management_helper.rb index f211e410f2d..766d0a1f277 100644 --- a/app/helpers/projects/alert_management_helper.rb +++ b/app/helpers/projects/alert_management_helper.rb @@ -5,9 +5,10 @@ module Projects::AlertManagementHelper { 'project-path' => project.full_path, 'enable-alert-management-path' => edit_project_service_path(project, AlertsService), + 'populating-alerts-help-url' => help_page_url('user/project/operations/alert_management.html', anchor: 'enable-alert-management'), 'empty-alert-svg-path' => image_path('illustrations/alert-management-empty-state.svg'), 'user-can-enable-alert-management' => can?(current_user, :admin_project, project).to_s, - 'alert-management-enabled' => (!!project.alerts_service_activated?).to_s + 'alert-management-enabled' => alert_management_enabled?(project).to_s } end @@ -19,4 +20,10 @@ module Projects::AlertManagementHelper 'project-issues-path' => project_issues_path(project) } end + + private + + def alert_management_enabled?(project) + !!(project.alerts_service_activated? || project.prometheus_service_active?) + end end |