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/operations_helper.rb')
-rw-r--r--app/helpers/operations_helper.rb13
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),