diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-16 00:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-16 00:08:49 +0300 |
commit | cf1d4237a4f226ba2deed26240544da0675a41e5 (patch) | |
tree | 926a71b9279659bc52db0187b463603934718bf2 /app/views/projects/settings | |
parent | 0ac82f99553ce12009970a14c0afc02d1f6515bb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/settings')
-rw-r--r-- | app/views/projects/settings/operations/_incidents.html.haml | 32 | ||||
-rw-r--r-- | app/views/projects/settings/operations/show.html.haml | 2 |
2 files changed, 33 insertions, 1 deletions
diff --git a/app/views/projects/settings/operations/_incidents.html.haml b/app/views/projects/settings/operations/_incidents.html.haml new file mode 100644 index 00000000000..fa2f3d7dc08 --- /dev/null +++ b/app/views/projects/settings/operations/_incidents.html.haml @@ -0,0 +1,32 @@ +- templates = [] +- setting = project_incident_management_setting +- templates = setting.available_issue_templates.map { |t| [t.name, t.key] } + +%section.settings.no-animate.js-incident-management-settings + .settings-header + %h4= _('Incidents') + %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 + = form.check_box :create_issue + = 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 + = form.select :issue_template_key, templates, {include_blank: 'No template selected'}, class: "form-control select-control" + = 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' + = f.submit _('Save changes'), class: 'btn btn-success' diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 3c955e5f558..30b914b5199 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -2,7 +2,7 @@ - page_title _('Operations Settings') - breadcrumb_title _('Operations Settings') -= render_if_exists 'projects/settings/operations/incidents' += render 'projects/settings/operations/incidents' = render 'projects/settings/operations/error_tracking' = render 'projects/settings/operations/external_dashboard' = render 'projects/settings/operations/grafana_integration' |