debian-mirror-gitlab/app/views/projects/settings/operations/_incidents.html.haml

33 lines
2 KiB
Text
Raw Normal View History

2020-03-09 13:42:32 +05:30
- templates = []
- setting = project_incident_management_setting
- templates = setting.available_issue_templates.map { |t| [t.name, t.key] }
2020-05-24 23:13:21 +05:30
%section.settings.no-animate.qa-incident-management-settings{ data: { qa_selector: 'incidents_settings_content' } }
2020-03-09 13:42:32 +05:30
.settings-header
2020-04-08 14:13:33 +05:30
%h3{ :class => "h4" }= _('Incidents')
2020-03-09 13:42:32 +05:30
%button.btn.js-settings-toggle{ type: 'button' }
= _('Expand')
%p
= _('Action to take when receiving an alert.')
= link_to help_page_path('user/project/integrations/prometheus', anchor: 'taking-action-on-an-alert-ultimate') do
= _('More information')
.settings-content
= form_for @project, url: project_settings_operations_path(@project), method: :patch do |f|
= form_errors(@project.incident_management_setting)
.form-group
= f.fields_for :incident_management_setting_attributes, setting do |form|
.form-group
2020-05-24 23:13:21 +05:30
= form.check_box :create_issue, data: { qa_selector: 'create_issue_checkbox' }
2020-03-09 13:42:32 +05:30
= form.label :create_issue, _('Create an issue. Issues are created for each alert triggered.'), class: 'form-check-label'
.form-group.col-sm-8
= form.label :issue_template_key, class: 'label-bold' do
= _('Issue template (optional)')
= link_to icon('question-circle'), help_page_path('user/project/description_templates', anchor: 'creating-issue-templates'), target: '_blank', rel: 'noopener noreferrer'
.select-wrapper
2020-05-24 23:13:21 +05:30
= form.select :issue_template_key, templates, {include_blank: 'No template selected'}, class: "form-control select-control", data: { qa_selector: 'incident_templates_dropdown' }
2020-03-09 13:42:32 +05:30
= icon('chevron-down')
.form-group
= form.check_box :send_email
= form.label :send_email, _('Send a separate email notification to Developers.'), class: 'form-check-label'
2020-05-24 23:13:21 +05:30
= f.submit _('Save changes'), class: 'btn btn-success', data: { qa_selector: 'save_changes_button' }