Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_error_tracking.html.haml « application_settings « admin « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6754dd99bbca4f447ccdac8f26ce9c32d104a172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- expanded = integration_expanded?('error_tracking_')

%section.settings.as-error-tracking.no-animate#js-error-tracking-settings{ class: ('expanded' if expanded) }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
      = _('GitLab Error Tracking')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    %p.gl-text-secondary
      = _('Allows projects to track errors using an Opstrace integration.').html_safe % { link: help_page_path('operations/error_tracking.md') }
      = link_to _('Learn more.'), help_page_path('operations/error_tracking.md'), target: '_blank', rel: 'noopener noreferrer'

  .settings-content

    %fieldset
      .sub-section
        %h4= _('Access Token')
        .form-group
          .form-text
            %p.text-secondary
              = s_("ErrorTracking|Access token is %{token_in_code_tag}").html_safe % { token_in_code_tag: content_tag(:code, Gitlab::CurrentSettings.error_tracking_access_token, id: 'error-tracking-access-token') }
          .form-inline
            - reset_url = reset_error_tracking_access_token_admin_application_settings_url
            = render Pajamas::ButtonComponent.new(method: :put, href: reset_url, variant: :danger, size: :small, button_options: { data: { confirm: _('Are you sure you want to reset the error tracking access token?') }}) do
              = _("Reset error tracking access token")

    = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-error-tracking-settings'), html: { class: 'fieldset-form', id: 'error-tracking-settings' } do |f|
      = form_errors(@application_setting) if expanded

      %fieldset
        .sub-section
          %h4= _('Configure Error Tracking')
          .form-group
            = f.gitlab_ui_checkbox_component :error_tracking_enabled,
            _('Enable GitLab Error Tracking')
          .form-group
            = f.label :error_tracking_api_url, _('Opstrace endpoint for Error Tracking integration'), class: 'label-light'
            = f.text_field :error_tracking_api_url, class: 'form-control gl-form-input'

      = f.submit _('Save changes'), pajamas_button: true