summaryrefslogtreecommitdiff
path: root/app/helpers/operations_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /app/helpers/operations_helper.rb
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
downloadgitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/helpers/operations_helper.rb')
-rw-r--r--app/helpers/operations_helper.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/helpers/operations_helper.rb b/app/helpers/operations_helper.rb
index df07baa2d03..fb410c46128 100644
--- a/app/helpers/operations_helper.rb
+++ b/app/helpers/operations_helper.rb
@@ -10,6 +10,9 @@ module OperationsHelper
end
def alerts_settings_data(disabled: false)
+ setting = project_incident_management_setting
+ 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),
@@ -21,21 +24,22 @@ module OperationsHelper
'alerts_usage_url' => project_alert_management_index_path(@project),
'disabled' => disabled.to_s,
'project_path' => @project.full_path,
- 'multi_integrations' => 'false'
+ 'multi_integrations' => 'false',
+ 'templates' => templates.to_json,
+ 'create_issue' => setting.create_issue.to_s,
+ 'issue_template_key' => setting.issue_template_key.to_s,
+ 'send_email' => setting.send_email.to_s,
+ 'auto_close_incident' => setting.auto_close_incident.to_s,
+ 'pagerduty_reset_key_path' => reset_pagerduty_token_project_settings_operations_path(@project),
+ 'operations_settings_endpoint' => project_settings_operations_path(@project)
}
end
def operations_settings_data
setting = project_incident_management_setting
- templates = setting.available_issue_templates.map { |t| { key: t.key, name: t.name } }
{
operations_settings_endpoint: project_settings_operations_path(@project),
- templates: templates.to_json,
- create_issue: setting.create_issue.to_s,
- issue_template_key: setting.issue_template_key.to_s,
- send_email: setting.send_email.to_s,
- auto_close_incident: setting.auto_close_incident.to_s,
pagerduty_active: setting.pagerduty_active.to_s,
pagerduty_token: setting.pagerduty_token.to_s,
pagerduty_webhook_url: project_incidents_integrations_pagerduty_url(@project, token: setting.pagerduty_token),