File: _error_tracking.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (35 lines) | stat: -rw-r--r-- 2,020 bytes parent folder | download
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
- expanded = integration_expanded?('error_tracking_')

= render ::Layouts::SettingsBlockComponent.new(_('GitLab Error Tracking'),
  id: 'js-error-tracking-settings',
  expanded: expanded) do |c|
  - c.with_description do
    = _('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'
  - c.with_body do
    %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