diff options
Diffstat (limited to 'app/views/admin')
29 files changed, 130 insertions, 186 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml deleted file mode 100644 index aa5543700a7..00000000000 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ /dev/null @@ -1,39 +0,0 @@ -- reporter = abuse_report.reporter -- user = abuse_report.user -%tr - %th.d-block.d-sm-none - %strong= _('User') - %td - - if user - = link_to user.name, user - .light.small - = html_escape(_('Joined %{time_ago}')) % { time_ago: time_ago_with_tooltip(user.created_at).html_safe } - - else - = _('(removed)') - %td - - if reporter - %strong.subheading.d-block.d-sm-none - = _('Reported by %{reporter}').html_safe % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } - .light.gl-display-none.gl-sm-display-block - = link_to(reporter.name, reporter) - .light.small - = time_ago_with_tooltip(abuse_report.created_at) - - else - = _('(removed)') - %td - %strong.subheading.d-block.d-sm-none - = _('Message') - .message - = markdown_field(abuse_report, :message) - %td - - if user && user != current_user - = render Pajamas::ButtonComponent.new(href: admin_abuse_report_path(abuse_report, remove_user: true), variant: :danger, block: true, button_options: { data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name }, confirm_btn_variant: "danger", remote: true, method: :delete }, class: "js-remove-tr" }) do - = _('Remove user & report') - - if user.blocked? - = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, disabled: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do - = _('Already blocked') - - else - = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do - = _('Block user') - = render Pajamas::ButtonComponent.new(href: [:admin, abuse_report], block: true, button_options: { data: { remote: true, method: :delete }, class: "js-remove-tr" }) do - = _('Remove report') diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml index fee3a846849..ea2d4f3b4af 100644 --- a/app/views/admin/abuse_reports/index.html.haml +++ b/app/views/admin/abuse_reports/index.html.haml @@ -2,35 +2,5 @@ %h1.page-title.gl-font-size-h-display= _('Abuse Reports') -- if Feature.enabled?(:abuse_reports_list) - #js-abuse-reports-list-app{ data: abuse_reports_list_data(@abuse_reports) } - = gl_loading_icon(css_class: 'gl-my-5', size: 'md') -- else - .row-content-block.second-block - = form_tag admin_abuse_reports_path, method: :get, class: 'filter-form' do - .filter-categories.flex-fill - .filter-item.inline - = dropdown_tag(user_dropdown_label(params[:user_id], 'User'), - options: { toggle_class: 'js-filter-submit js-user-search', - title: _('Filter by user'), filter: true, filterInput: 'input#user-search', - dropdown_class: 'dropdown-menu-selectable dropdown-menu-user js-filter-submit', - placeholder: _('Search users'), - data: { current_user: true, field_name: 'user_id' }}) - - .abuse-reports - - if @abuse_reports.present? - .table-holder - %table.table.responsive-table - %thead.d-none.d-md-table-header-group - %tr - %th= _('User') - %th= _('Reported by') - %th.wide= _('Message') - %th= _('Action') - = render @abuse_reports - = paginate @abuse_reports, theme: 'gitlab' - - else - .empty-state - .text-center - %h4= _("There are no abuse reports!") - %h3= emoji_icon('tada') +#js-abuse-reports-list-app{ data: abuse_reports_list_data(@abuse_reports) } + = gl_loading_icon(css_class: 'gl-my-5', size: 'md') diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml index d8d6af606ac..b65649b5a07 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -19,25 +19,6 @@ = f.label :receive_max_input_size, _('Maximum push size (MiB)'), class: 'label-light' = f.number_field :receive_max_input_size, class: 'form-control gl-form-input', title: _('Maximum size limit for a single commit.'), data: { toggle: 'tooltip', container: 'body', qa_selector: 'receive_max_input_size_field' } .form-group - = f.label :max_export_size, _('Maximum export size (MiB)'), class: 'label-light' - = f.number_field :max_export_size, class: 'form-control gl-form-input', title: _('Maximum size of export files.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Set to 0 for no size limit.') - .form-group - = f.label :max_import_size, _('Maximum import size (MiB)'), class: 'label-light' - = f.number_field :max_import_size, class: 'form-control gl-form-input', title: _('Maximum size of import files.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Only effective when remote storage is enabled. Set to 0 for no size limit.') - .form-group - = f.label :max_import_remote_file_size, s_('Import|Maximum import remote file size (MB)'), class: 'label-light' - = f.number_field :max_import_remote_file_size, class: 'form-control gl-form-input', title: s_('Import|Maximum remote file size for imports from external object storages. For example, AWS S3.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Set to 0 for no size limit.') - .form-group - = f.label :bulk_import_max_download_file_size, s_('BulkImport|Direct transfer maximum download file size (MB)'), class: 'label-light' - = f.number_field :bulk_import_max_download_file_size, class: 'form-control gl-form-input', title: s_('BulkImport|Maximum download file size when importing from source GitLab instances by direct transfer.'), data: { toggle: 'tooltip', container: 'body' } - .form-group - = f.label :max_decompressed_archive_size, s_('Import|Maximum decompressed size (MiB)'), class: 'label-light' - = f.number_field :max_decompressed_archive_size, class: 'form-control gl-form-input', title: s_('Import|Maximum size of decompressed archive.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Set to 0 for no size limit.') - .form-group = f.label :session_expire_delay, _('Session duration (minutes)'), class: 'label-light' = f.number_field :session_expire_delay, class: 'form-control gl-form-input', title: _('Maximum duration of a session.'), data: { toggle: 'tooltip', container: 'body' } %span.form-text.text-muted#session_expire_delay_help_block= _('Restart GitLab to apply changes.') @@ -53,7 +34,7 @@ .form-group = f.label :user_oauth_applications, _('User OAuth applications'), class: 'label-bold' - = f.gitlab_ui_checkbox_component :user_oauth_applications, _('Allow users to register any application to use GitLab as an OAuth provider') + = f.gitlab_ui_checkbox_component :user_oauth_applications, _('Allow users to register any application to use GitLab as an OAuth provider. This setting does not affect group-level OAuth applications.') .form-group = f.label :user_default_external, _('New users set to external'), class: 'label-bold' = f.gitlab_ui_checkbox_component :user_default_external, _('Newly-registered users are external by default') diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index 2f31eb5f6d1..65049fa5466 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -16,9 +16,6 @@ = render_if_exists 'admin/application_settings/email_additional_text_setting', form: f .form-group - = f.gitlab_ui_checkbox_component :in_product_marketing_emails_enabled, _('Enable in-product marketing emails'), help_text: _('Send emails to help guide new users through the onboarding process.') - - .form-group = f.gitlab_ui_checkbox_component :user_deactivation_emails_enabled, _('Enable user deactivation emails'), help_text: _('Send emails to users upon account deactivation.') - if Feature.enabled?(:deactivation_email_additional_text) diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index 988153d45a4..1f56487cea4 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -6,7 +6,7 @@ = _('Gitpod') = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') - .gl-text-secondary + .gl-text-secondary.gl-mb-5 #js-gitpod-settings-help-text{ data: {"message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } } = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') diff --git a/app/views/admin/application_settings/_import_and_export.html.haml b/app/views/admin/application_settings/_import_and_export.html.haml new file mode 100644 index 00000000000..8e321406bf8 --- /dev/null +++ b/app/views/admin/application_settings/_import_and_export.html.haml @@ -0,0 +1,43 @@ += gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-import-export-settings'), html: { class: 'fieldset-form', id: 'import-export-settings' } do |f| + = form_errors(@application_setting) + + %fieldset + .form-group + = f.label :import_sources, s_('AdminSettings|Import sources'), class: 'label-bold gl-mb-0' + %span.form-text.gl-mt-0.gl-mb-3#import-sources-help + - tag_pair_github_docs = tag_pair(link_to('', help_page_path('integration/github'), target: '_blank', rel: 'noopener noreferrer'), :github_docs_link_start, :github_docs_link_end) + - tag_pair_bitbucket_docs = tag_pair(link_to('', help_page_path('integration/bitbucket'), target: '_blank', rel: 'noopener noreferrer'), :bitbucket_docs_link_start, :bitbucket_docs_link_end) + = safe_format(s_('AdminSettings|Code can be imported from enabled sources during project creation. OmniAuth must be configured for GitHub %{github_docs_link_start}%{icon}%{github_docs_link_end} and Bitbucket %{bitbucket_docs_link_start}%{icon}%{bitbucket_docs_link_end}.'), tag_pair_github_docs, tag_pair_bitbucket_docs, icon: sprite_icon('question-o')) + = hidden_field_tag 'application_setting[import_sources][]' + - import_sources_checkboxes(f).each do |source| + = source + .form-group{ data: { testid: 'project-export' } } + = f.label :project_export, s_('AdminSettings|Project export'), class: 'label-bold' + = f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Enabled') + .form-group{ data: { testid: 'bulk-import' } } + = f.label :bulk_import, s_('AdminSettings|Allow migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold' + = f.gitlab_ui_checkbox_component :bulk_import_enabled, s_('AdminSettings|Enabled') + .form-group + = f.label :max_export_size, _('Maximum export size (MiB)'), class: 'label-light' + = f.number_field :max_export_size, class: 'form-control gl-form-input', title: _('Maximum size of export files.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 for no size limit.') + .form-group + = f.label :max_import_size, _('Maximum import size (MiB)'), class: 'label-light' + = f.number_field :max_import_size, class: 'form-control gl-form-input', title: _('Maximum size of import files.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Only effective when remote storage is enabled. Set to 0 for no size limit.') + .form-group + = f.label :max_import_remote_file_size, s_('Import|Maximum import remote file size (MiB)'), class: 'label-light' + = f.number_field :max_import_remote_file_size, class: 'form-control gl-form-input', title: s_('Import|Maximum remote file size for imports from external object storages. For example, AWS S3.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 for no size limit.') + .form-group + = f.label :bulk_import_max_download_file_size, s_('BulkImport|Direct transfer maximum download file size (MiB)'), class: 'label-light' + = f.number_field :bulk_import_max_download_file_size, class: 'form-control gl-form-input', title: s_('BulkImport|Maximum download file size when importing from source GitLab instances by direct transfer.'), data: { toggle: 'tooltip', container: 'body' } + .form-group + = f.label :max_decompressed_archive_size, s_('Import|Maximum decompressed file size for archives from imports (MiB)'), class: 'label-light' + = f.number_field :max_decompressed_archive_size, class: 'form-control gl-form-input', title: s_('Import|Maximum size of decompressed archive.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 for no size limit.') + .form-group + = f.label :decompress_archive_file_timeout, s_('Import|Timeout for decompressing archived files (seconds)'), class: 'label-light' + = f.number_field :decompress_archive_file_timeout, class: 'form-control gl-form-input', title: s_('Import|Timeout for decompressing archived files.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 to disable timeout.') + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 1eb6b747704..d5f2c6afee3 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -19,28 +19,25 @@ = f.label :max_pages_size, _('Maximum size of pages (MiB)'), class: 'label-bold' = f.number_field :max_pages_size, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-maximum-size-of-gitlab-pages-site-in-a-project') - - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } - = s_('AdminSettings|Set the maximum size of GitLab Pages per project (0 for unlimited). %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/pages/index', anchor: 'set-maximum-size-of-gitlab-pages-site-in-a-project'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AdminSettings|Set the maximum size of GitLab Pages per project (0 for unlimited). %{link_start}Learn more.%{link_end}'), tag_pair(link, :link_start, :link_end)) .form-group = f.label :max_pages_custom_domains_per_project, s_('AdminSettings|Maximum number of custom domains per project'), class: 'label-bold' = f.number_field :max_pages_custom_domains_per_project, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-maximum-number-of-gitlab-pages-custom-domains-for-a-project') - - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } - = s_('AdminSettings|Set the maximum number of GitLab Pages custom domains per project (0 for unlimited). %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/pages/index', anchor: 'set-maximum-number-of-gitlab-pages-custom-domains-for-a-project'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AdminSettings|Set the maximum number of GitLab Pages custom domains per project (0 for unlimited). %{link_start}Learn more.%{link_end}'), tag_pair(link, :link_start, :link_end)) %h5 = s_("AdminSettings|Configure Let's Encrypt") %p - - lets_encrypt_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: "https://letsencrypt.org/" } - = _("%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA) that issues digital certificates to enable HTTPS (SSL/TLS) for sites.").html_safe % { lets_encrypt_link_start: lets_encrypt_link_start, lets_encrypt_link_end: '</a>'.html_safe } + - link = link_to('', "https://letsencrypt.org/", target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA) that issues digital certificates to enable HTTPS (SSL/TLS) for sites."), tag_pair(link, :lets_encrypt_link_start, :lets_encrypt_link_end)) .form-group = f.label :lets_encrypt_notification_email, s_("AdminSettings|Let's Encrypt email"), class: 'label-bold' = f.text_field :lets_encrypt_notification_email, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'lets-encrypt-integration') - - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } - = s_("AdminSettings|A Let's Encrypt account will be configured for this GitLab instance using this email address. You will receive emails to warn of expiring certificates. %{link_start}Learn more.%{link_end}").html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/pages/index', anchor: 'lets-encrypt-integration'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_("AdminSettings|A Let's Encrypt account will be configured for this GitLab instance using this email address. You will receive emails to warn of expiring certificates. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) .form-group - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path } = f.gitlab_ui_checkbox_component :lets_encrypt_terms_of_service_accepted, diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 3a7a951d137..cd17e4bdec3 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -4,7 +4,7 @@ %fieldset .form-group = f.gitlab_ui_checkbox_component :throttle_protected_paths_enabled, - _('Enable rate limiting for POST requests to the specified paths'), + _('Enable rate limiting for requests to the specified paths'), help_text: _('Helps reduce request volume for protected paths.') .form-group = f.label :throttle_protected_paths_requests_per_period, 'Maximum requests per period per user', class: 'label-bold' @@ -14,11 +14,14 @@ = f.number_field :throttle_protected_paths_period_in_seconds, class: 'form-control gl-form-input' .form-group = f.label :protected_paths, class: 'label-bold' do - = _('Paths to protect with rate limiting') + = _('Paths with rate limiting for POST requests') = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 + .form-group + = f.label :protected_paths_for_get_request, class: 'label-bold' do + = _('Paths with rate limiting for GET requests') + = f.text_area :protected_paths_for_get_request_raw, class: 'form-control gl-form-input', rows: 10 %span.form-text.text-muted - - relative_url_link = 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab' - - relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link } - = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } + - link = link_to('', 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab', target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.'), tag_pair(link, :relative_url_link_start, :relative_url_link_end)) = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_search_limits.html.haml b/app/views/admin/application_settings/_search_limits.html.haml index 396c263dd5d..b318f7e5a20 100644 --- a/app/views/admin/application_settings/_search_limits.html.haml +++ b/app/views/admin/application_settings/_search_limits.html.haml @@ -12,5 +12,11 @@ = f.label :search_rate_limit_unauthenticated, _('Maximum number of requests per minute for an unauthenticated IP address'), class: 'label-bold' = f.number_field :search_rate_limit_unauthenticated, class: 'form-control gl-form-input' + .form-group + = f.label :search_rate_limit_allowlist, _('Users to exclude from the rate limit'), class: 'label-bold' + = f.text_area :search_rate_limit_allowlist_raw, class: 'form-control gl-form-input', rows: 5, aria: { describedBy: 'search-rate-limit-allowlist-field-description' } + .form-text.text-muted{ id: 'search-rate-limit-allowlist-field-description' } + = _('List of users who are allowed to exceed the rate limit. Example: username1, username2') + = f.submit _('Save changes'), data: { qa_selector: 'save_changes_button' }, pajamas_button: true diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml index 20164cfe88d..9f2a40e4e54 100644 --- a/app/views/admin/application_settings/_sentry.html.haml +++ b/app/views/admin/application_settings/_sentry.html.haml @@ -17,4 +17,12 @@ = f.label :sentry_environment, _('Environment'), class: 'label-light' = f.text_field :sentry_environment, class: 'form-control gl-form-input', placeholder: Rails.env + %p.text-muted + = _("Changing any setting bellow doesn't require an application restart") + + %fieldset + .form-group + = f.label :sentry_clientside_traces_sample_rate, _('Clientside traces sample rate'), class: 'label-light' + = f.number_field :sentry_clientside_traces_sample_rate, class: 'form-control gl-form-input', placeholder: '0.5', min: 0, max: 1, step: 0.001 + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_silent_mode_settings_form.html.haml b/app/views/admin/application_settings/_silent_mode_settings_form.html.haml new file mode 100644 index 00000000000..92b4174842f --- /dev/null +++ b/app/views/admin/application_settings/_silent_mode_settings_form.html.haml @@ -0,0 +1,11 @@ +%section.settings.no-animate#js-silent-mode-toggle{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only + = s_('SilentMode|Silent mode') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded_by_default? ? _('Collapse') : _('Expand') + %p.gl-text-secondary + = s_('SilentMode|Suppress outbound communication, such as emails, from GitLab.') + = link_to _('Learn more.'), help_page_path('administration/silent_mode/index'), target: '_blank', rel: 'noopener noreferrer' + .settings-content + #js-silent-mode-settings{ data: { "silent-mode-enabled" => @application_setting.silent_mode_enabled.to_s } } diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 6f9aad56ce8..1b90432e1f3 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -6,7 +6,7 @@ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p.gl-text-secondary - - help_link = link_to('', help_page_path('development/snowplow/index'), target: '_blank', rel: 'noopener noreferrer') + - help_link = link_to('', help_page_path('development/internal_analytics/snowplow/index'), target: '_blank', rel: 'noopener noreferrer') - snowplow_link = link_to('', 'https://snowplow.io/', target: '_blank', rel: 'noopener noreferrer') = safe_format(_('Configure %{snowplow_link_start}Snowplow%{snowplow_link_end} to track events. %{help_link_start}Learn more.%{help_link_end}'), tag_pair(snowplow_link, :snowplow_link_start, :snowplow_link_end), tag_pair(help_link, :help_link_start, :help_link_end)) .settings-content diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 0455394444c..5a3814ca83d 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -12,7 +12,7 @@ help_text: _("GitLab informs you if a new version is available. %{link_start}What information does GitLab Inc. collect?%{link_end}").html_safe % { link_start: help_link_start, link_end: link_end } .form-group - can_be_configured = @application_setting.usage_ping_can_be_configured? - - service_ping_link_start = link_start % { url: help_page_path('development/service_ping/index') } + - service_ping_link_start = link_start % { url: help_page_path('development/internal_analytics/service_ping/index') } - deactivating_service_ping_link_start = link_start % { url: help_page_path('administration/settings/usage_statistics', anchor: 'disable-usage-statistics-with-the-configuration-file') } - usage_ping_help_text = s_('AdminSettings|To help improve GitLab and its user experience, GitLab periodically collects usage information. %{link_start}What information is shared with GitLab Inc.?%{link_end}').html_safe % { link_start: service_ping_link_start, link_end: link_end } - disabled_help_text = s_('AdminSettings|Service ping is disabled in your configuration file, and cannot be enabled through this form. For more information, see the documentation on %{link_start}deactivating service ping%{link_end}.').html_safe % { link_start: deactivating_service_ping_link_start, link_end: link_end } @@ -35,19 +35,10 @@ checkbox_options: { id: 'application_setting_usage_ping_features_enabled' }, label_options: { id: 'service_ping_features_label' } .form-text.gl-text-gray-500.gl-pl-6 - %p.gl-mb-3= s_('AdminSettings|Registration Features include:') - - email_from_gitlab_path = help_page_path('administration/email_from_gitlab') - - repo_size_limit_path = help_page_path('administration/settings/account_and_limit_settings', anchor: 'repository-size-limit') - - restrict_ip_path = help_page_path('user/group/access_and_permissions', anchor: 'restrict-group-access-by-ip-address') - - email_from_gitlab_link = link_start % { url: email_from_gitlab_path } - - repo_size_limit_link = link_start % { url: repo_size_limit_path } - - restrict_ip_link = link_start % { url: restrict_ip_path } - %ul - %li - = s_('AdminSettings|Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}.').html_safe % { link_start: email_from_gitlab_link, link_end: link_end } - %li - = s_('AdminSettings|Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}.').html_safe % { link_start: repo_size_limit_link, link_end: link_end } - %li - = s_('AdminSettings|Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end } + %p.gl-mb-3 + - registration_features_gitlab_path = help_page_path('administration/settings/usage_statistics', anchor: 'registration-features-program') + - registration_features_gitlab_link = link_to('', registration_features_gitlab_path, target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AdminSettings|For a list of included Registration Features, see %{link_start}the documentation%{link_end}.'), tag_pair(registration_features_gitlab_link, :link_start, :link_end)) + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index 7142128d2cd..624f5a48c3a 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -19,33 +19,17 @@ = s_('AdminSettings|Restricted visibility levels') %small.form-text.text-gl-muted = s_('AdminSettings|Prevent non-administrators from using the selected visibility levels for groups, projects and snippets.') + = s_('AdminSettings|The selected level must be different from the selected default group and project visibility.') + = link_to _('Learn more.'), help_page_path('administration/settings/visibility_and_access_controls', anchor: 'restrict-visibility-levels'), target: '_blank', rel: 'noopener noreferrer' = hidden_field_tag 'application_setting[restricted_visibility_levels][]' .gl-form-checkbox-group - restricted_level_checkboxes(f).each do |checkbox| = checkbox - .form-group - = f.label :import_sources, s_('AdminSettings|Import sources'), class: 'label-bold gl-mb-0' - %span.form-text.gl-mt-0.gl-mb-3#import-sources-help - = _('Code can be imported from enabled sources during project creation. OmniAuth must be configured for GitHub') - = link_to sprite_icon('question-o'), help_page_path("integration/github") - and Bitbucket - = link_to sprite_icon('question-o'), help_page_path("integration/bitbucket") - = hidden_field_tag 'application_setting[import_sources][]' - - import_sources_checkboxes(f).each do |source| - = source = render_if_exists 'admin/application_settings/ldap_access_setting', form: f = render_if_exists 'admin/application_settings/saml_group_locks_setting', form: f - .form-group{ data: { testid: 'project-export' } } - = f.label :project_export, s_('AdminSettings|Project export'), class: 'label-bold' - = f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Enabled') - - .form-group{ data: { testid: 'bulk-import' } } - = f.label :bulk_import, s_('AdminSettings|Allow migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold' - = f.gitlab_ui_checkbox_component :bulk_import_enabled, s_('AdminSettings|Enabled') - .form-group %label.label-bold= _('Enabled Git access protocols') = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control') diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 6ae9c58ffcd..5aa2684f084 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -10,7 +10,7 @@ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p.gl-text-secondary - = _('Set visibility of project contents. Configure import sources and Git access protocols.') + = s_('AdminSettings|Set visibility of project contents and configure Git access protocols.') .settings-content = render 'visibility_and_access' @@ -25,6 +25,17 @@ .settings-content = render 'account_and_limit' +%section.settings.as-import-export.no-animate#js-import-export-settings{ class: ('expanded' if expanded_by_default?), data: { testid: 'admin-import-export-settings' } } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only + = _('Import and export settings') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle '}) do + = expanded_by_default? ? _('Collapse') : _('Expand') + %p.gl-text-secondary + = _('Configure import sources and settings related to import and export features.') + .settings-content + = render 'import_and_export' + %section.settings.as-diff-limits.no-animate#js-merge-request-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only @@ -89,6 +100,7 @@ = render 'terminal' = render_if_exists 'admin/application_settings/maintenance_mode_settings_form' += render 'admin/application_settings/silent_mode_settings_form' = render 'admin/application_settings/gitpod' = render 'admin/application_settings/kroki' = render 'admin/application_settings/mailgun' diff --git a/app/views/admin/dev_ops_report/_score.html.haml b/app/views/admin/dev_ops_report/_score.html.haml index 208afefc73b..a504563ad91 100644 --- a/app/views/admin/dev_ops_report/_score.html.haml +++ b/app/views/admin/dev_ops_report/_score.html.haml @@ -1,6 +1,6 @@ - service_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled - if !service_ping_enabled - #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/service_ping/index.md') } } + #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/internal_analytics/service_ping/index.md') } } - else #js-devops-score{ data: { devops_score_metrics: devops_score_metrics(@metric).to_json, no_data_image_path: image_path('dev_ops_report_no_data.svg'), devops_score_intro_image_path: image_path('dev_ops_report_overview.svg') } } diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index b708564e23a..2da28910af3 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -41,6 +41,6 @@ - else .gl-mt-5 - = f.submit _('Save changes'), data: { qa_selector: 'save_changes_button' }, pajamas_button: true + = f.submit _('Save changes'), data: { testid: 'save-changes-button' }, pajamas_button: true = render Pajamas::ButtonComponent.new(href: admin_group_path(@group)) do = _('Cancel') diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index 20d24161c57..0c4bf91f545 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -1,11 +1,11 @@ - group = local_assigns.fetch(:group) -%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { qa_selector: 'group_row_content' } } +%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { testid: 'group-row-content' } } = render Pajamas::AvatarComponent.new(group, size: 32, alt: '') .gl-min-w-0.gl-flex-grow-1.gl-ml-3 .title - = link_to [:admin, group], class: 'group-name', data: { qa_selector: 'group_name_link' } do + = link_to [:admin, group], class: 'group-name', data: { testid: 'group-name-link' } do = group.full_name - if group.description.present? diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 2a49b9c5ad8..9f42897d1da 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -7,7 +7,7 @@ = hidden_field_tag :sort, @sort .search-holder .search-field-holder - = search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' } + = search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { testid: 'group-search-field' } = sprite_icon('search', css_class: 'search-icon') = render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_admin_group_path) do diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 5f5f6c98663..f7a49c88d78 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -8,7 +8,7 @@ = _('Group: %{group_name}') % { group_name: @group.full_name } = render Pajamas::ButtonComponent.new(href: admin_group_edit_path(@group), - button_options: { class: 'gl-float-right', data: { qa_selector: 'edit_group_link' }}, + button_options: { class: 'gl-float-right', data: { testid: 'edit-group-link' }}, icon: 'pencil') do = _('Edit') %hr diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml index 0ccde159905..096fae8d457 100644 --- a/app/views/admin/hook_logs/show.html.haml +++ b/app/views/admin/hook_logs/show.html.haml @@ -1,5 +1,5 @@ - page_title _('Request details') -%h1.page-title.gl-font-size-h-display +%h2.page-title.gl-font-size-h-display = _("Request details") %hr diff --git a/app/views/admin/identities/_identity.html.haml b/app/views/admin/identities/_identity.html.haml index a24cd000464..921232125ff 100644 --- a/app/views/admin/identities/_identity.html.haml +++ b/app/views/admin/identities/_identity.html.haml @@ -7,6 +7,8 @@ = saml_group_link(identity) %td = identity.extern_uid + %td + = '-' %td{ class: 'gl-py-0!' } - button_classes = 'has-tooltip gl-my-3' = render Pajamas::ButtonComponent.new(category: :tertiary, diff --git a/app/views/admin/identities/index.html.haml b/app/views/admin/identities/index.html.haml index 1bb14969939..8077f0e15ca 100644 --- a/app/views/admin/identities/index.html.haml +++ b/app/views/admin/identities/index.html.haml @@ -10,6 +10,7 @@ %th{ class: 'gl-border-t-0!' }= s_('Identity|Provider ID') %th{ class: 'gl-border-t-0!' }= _('Group') %th{ class: 'gl-border-t-0!' }= _('Identifier') + %th{ class: 'gl-border-t-0!' }= s_('Identity|Active') %th{ class: 'gl-border-t-0!' }= _('Actions') - if identity_cells_to_render?(@identities, @user) = render_if_exists partial: 'admin/identities/scim_identity', collection: scim_identities_collection(@user) @@ -17,6 +18,6 @@ - else %tbody %tr - %td{ colspan: '5' } + %td{ colspan: '6' } .text-center.my-2 = _('This user has no identities') diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index c5632e0d70b..b8a9ad32259 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -1,30 +1,7 @@ - add_page_specific_style 'page_bundles/ci_status' -- add_page_specific_style 'page_bundles/admin/jobs_index' - breadcrumb_title _("Jobs") - page_title _("Jobs") -- if Feature.enabled?(:admin_jobs_vue) - #admin-jobs-app{ data: { job_statuses: job_statuses.to_json, empty_state_svg_path: image_path('jobs-empty-state.svg'), url: cancel_all_admin_jobs_path } } -- else - .top-area - .scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0.gl-w-full - %button.fade-left{ type: 'button', title: _('Scroll left'), 'aria-label': _('Scroll left') } - = sprite_icon('chevron-lg-left', size: 12) - %button.fade-right{ type: 'button', title: _('Scroll right'), 'aria-label': _('Scroll right') } - = sprite_icon('chevron-lg-right', size: 12) - - build_path_proc = ->(scope) { admin_jobs_path(scope: scope) } - = render "shared/builds/tabs", build_path_proc: build_path_proc, all_builds: @all_builds, scope: @scope - - - if @all_builds.running_or_pending.any? - #js-stop-jobs-modal - .nav-controls - = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { id: 'js-stop-jobs-button', data: { url: cancel_all_admin_jobs_path } }) do - = s_('AdminArea|Stop all jobs') - - .row-content-block.second-block - #{(@scope || 'all').capitalize} jobs - - %ul.content-list.builds-content-list.admin-builds-table - = render "projects/jobs/table", builds: @builds, admin: true +#admin-jobs-app{ data: { job_statuses: job_statuses.to_json, empty_state_svg_path: image_path('jobs-empty-state.svg'), url: cancel_all_admin_jobs_path } } diff --git a/app/views/admin/topics/_form.html.haml b/app/views/admin/topics/_form.html.haml index c3b5161d617..2638e45c9eb 100644 --- a/app/views/admin/topics/_form.html.haml +++ b/app/views/admin/topics/_form.html.haml @@ -20,7 +20,7 @@ = f.label :description, _("Description") .js-markdown-editor{ data: { render_markdown_path: preview_markdown_admin_topics_path, markdown_docs_path: help_page_path('user/markdown'), - qa_selector: 'topic_form_description', + testid: 'topic-form-description', form_field_placeholder: _('Write a description…'), supports_quick_actions: 'false', enable_autocomplete: 'false', diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 4979f7e28e7..5c80b3b4352 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -9,7 +9,7 @@ = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input gl-form-input-sm' .form-group.gl-form-group{ role: 'group' } - = f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create group') + = f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create top level group') = f.gitlab_ui_checkbox_component :private_profile, s_('AdminUsers|Private profile') %fieldset.form-group.gl-form-group diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index 8f7741b8a32..f6b7db2032f 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -31,7 +31,7 @@ - if impersonation_enabled? .gl-p-2 %span.btn-group{ class: !@can_impersonate ? 'has-tooltip' : nil, title: @impersonation_error_text } - = render Pajamas::ButtonComponent.new(disabled: !@can_impersonate, method: :post, href: impersonate_admin_user_path(@user), button_options: { data: { qa_selector: 'impersonate_user_link', testid: 'impersonate_user_link' } }) do + = render Pajamas::ButtonComponent.new(disabled: !@can_impersonate, method: :post, href: impersonate_admin_user_path(@user), button_options: { data: { testid: 'impersonate-user-link' } }) do = _('Impersonate') - if can_force_email_confirmation?(@user) .gl-p-2 @@ -48,5 +48,5 @@ = gl_tab_link_to _("SSH keys"), keys_admin_user_path(@user) = gl_tab_link_to _("Identities"), admin_user_identities_path(@user) - if impersonation_enabled? - = gl_tab_link_to _("Impersonation Tokens"), admin_user_impersonation_tokens_path(@user), data: { qa_selector: 'impersonation_tokens_tab' } + = gl_tab_link_to _("Impersonation Tokens"), admin_user_impersonation_tokens_path(@user), data: { testid: 'impersonation-tokens-tab' } .gl-mb-3 diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 213d5847986..d4a9009a0cf 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -35,7 +35,7 @@ = gl_tab_link_to admin_users_path(filter: "banned"), { item_active: active_when(params[:filter] == 'banned'), class: 'gl-border-0!' } do = s_('AdminUsers|Banned') = gl_tab_counter_badge(limited_counter_with_delimiter(User.banned)) - = gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { qa_selector: 'pending_approval_tab' } } do + = gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { testid: 'pending-approval-tab' } } do = s_('AdminUsers|Pending approval') = gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked_pending_approval)) = gl_tab_link_to admin_users_path(filter: "deactivated"), { item_active: active_when(params[:filter] == 'deactivated'), class: 'gl-border-0!' } do @@ -56,7 +56,7 @@ = hidden_field_tag "filter", h(params[:filter]) .search-holder .search-field-holder.gl-mb-4 - = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email, or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' } + = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email, or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { testid: 'user-search-field' } - if @sort.present? = hidden_field_tag :sort, @sort = sprite_icon('search', css_class: 'search-icon') diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index a4ae29bed81..4cc3e12a8ad 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -45,7 +45,7 @@ = link_button_to nil, remove_email_admin_user_path(@user, email), data: { confirm: _("Are you sure you want to remove %{email}?") % { email: email.email }, 'confirm-btn-variant': 'danger' }, method: :delete, class: 'float-right', title: _('Remove secondary email'), id: "remove_email_#{email.id}", variant: :danger, size: :small, icon: 'close' %li %span.light ID: - %strong{ data: { qa_selector: 'user_id_content' } } + %strong{ data: { testid: 'user-id-content' } } = @user.id %li %span.light= _('Namespace ID:') @@ -71,7 +71,7 @@ = render_if_exists 'admin/users/provisioned_by', user: @user %li - %span.light= _('Can create groups:') + %span.light= _('Can create top level groups:') %strong = @user.can_create_group ? _('Yes') : _('No') %li |