diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-01-06 19:45:00 +0100 |
---|---|---|
committer | Peter Leitzen <pleitzen@gitlab.com> | 2019-01-07 19:09:52 +0100 |
commit | 191c20d71447dca1a516b27c01a152a43cf8be69 (patch) | |
tree | 7cf89d4a0cc5c6bd87152d0350745a0cc58c8ac5 /app | |
parent | abce314027d0dd968abba1e40674ee43e24ab514 (diff) | |
download | gitlab-ce-191c20d71447dca1a516b27c01a152a43cf8be69.tar.gz |
Add error tracking setting partial
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/settings/operations/_error_tracking.html.haml | 30 | ||||
-rw-r--r-- | app/views/projects/settings/operations/show.html.haml | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/app/views/projects/settings/operations/_error_tracking.html.haml b/app/views/projects/settings/operations/_error_tracking.html.haml new file mode 100644 index 00000000000..71335e4dfd0 --- /dev/null +++ b/app/views/projects/settings/operations/_error_tracking.html.haml @@ -0,0 +1,30 @@ +- return unless Feature.enabled?(:error_tracking, @project) && can?(current_user, :read_environment, @project) + +- setting = error_tracking_setting + +%section.settings.expanded.border-0.no-animate + .settings-header + %h4 + = _('Error Tracking') + %p + = _('To link Sentry to GitLab, enter your Sentry URL and Auth Token.') + .settings-content + = form_for @project, url: project_settings_operations_path(@project), method: :patch do |f| + = form_errors(@project) + .form-group + = f.fields_for :error_tracking_setting_attributes, setting do |form| + .form-check.form-group + = form.check_box :enabled, class: 'form-check-input' + = form.label :enabled, _('Active'), class: 'form-check-label' + .form-group + = form.label :api_url, _('Sentry API URL'), class: 'label-bold' + = form.url_field :api_url, class: 'form-control', placeholder: _('http://<sentry-host>/api/0/projects/{organization_slug}/{project_slug}/issues/') + %p.form-text.text-muted + = _('Enter your Sentry API URL') + .form-group + = form.label :token, _('Auth Token'), class: 'label-bold' + = form.text_field :token, class: 'form-control' + %p.form-text.text-muted + = _('Find and manage Auth Tokens in your Sentry account settings page.') + + = 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 0782029dbcd..b36fa9a5f51 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -1,4 +1,5 @@ - @content_class = 'limit-container-width' unless fluid_layout - page_title _('Operations') += render 'projects/settings/operations/error_tracking', expanded: true = render_if_exists 'projects/settings/operations/tracing' |