diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /app/helpers/operations_helper.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/helpers/operations_helper.rb')
-rw-r--r-- | app/helpers/operations_helper.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/helpers/operations_helper.rb b/app/helpers/operations_helper.rb index fb410c46128..5d2f225edcf 100644 --- a/app/helpers/operations_helper.rb +++ b/app/helpers/operations_helper.rb @@ -2,10 +2,11 @@ module OperationsHelper include Gitlab::Utils::StrongMemoize + include IntegrationsHelper - def prometheus_service - strong_memoize(:prometheus_service) do - @project.find_or_initialize_service(::PrometheusService.to_param) + def prometheus_integration + strong_memoize(:prometheus_integration) do + @project.find_or_initialize_integration(::Integrations::Prometheus.to_param) end end @@ -14,11 +15,11 @@ module OperationsHelper templates = setting.available_issue_templates.map { |t| { key: t.key, name: t.name } } { - 'prometheus_activated' => prometheus_service.manual_configuration?.to_s, - 'prometheus_form_path' => scoped_integration_path(prometheus_service), + 'prometheus_activated' => prometheus_integration.manual_configuration?.to_s, + 'prometheus_form_path' => scoped_integration_path(prometheus_integration), 'prometheus_reset_key_path' => reset_alerting_token_project_settings_operations_path(@project), 'prometheus_authorization_key' => @project.alerting_setting&.token, - 'prometheus_api_url' => prometheus_service.api_url, + 'prometheus_api_url' => prometheus_integration.api_url, 'prometheus_url' => notify_project_prometheus_alerts_url(@project, format: :json), 'alerts_setup_url' => help_page_path('operations/incident_management/integrations.md', anchor: 'configuration'), 'alerts_usage_url' => project_alert_management_index_path(@project), |