diff options
Diffstat (limited to 'app/views/admin')
31 files changed, 185 insertions, 230 deletions
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 65882491575..e46a88b2217 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -52,8 +52,7 @@ = f.text_field :user_default_internal_regex, placeholder: _('Regex pattern'), class: 'form-control gl-form-input gl-mt-2' .help-block = _('Specify an email address regex pattern to identify default internal users.') - = link_to _('Learn more'), help_page_path('user/permissions', anchor: 'setting-new-users-to-external'), - target: '_blank' + = link_to _('Learn more'), help_page_path('user/permissions', anchor: 'setting-new-users-to-external'), target: '_blank', rel: 'noopener noreferrer' - unless Gitlab.com? .form-group = f.label :deactivate_dormant_users, _('Dormant users'), class: 'label-bold' @@ -63,7 +62,7 @@ = _('Deactivate dormant users after 90 days of inactivity') .help-block = _('Users can reactivate their account by signing in.') - = link_to _('Learn more'), help_page_path('user/admin_area/moderate_users', anchor: 'automatically-deactivate-dormant-users'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/admin_area/moderate_users', anchor: 'automatically-deactivate-dormant-users'), target: '_blank', rel: 'noopener noreferrer' .form-group = f.label :personal_access_token_prefix, _('Personal Access Token prefix'), class: 'label-light' = f.text_field :personal_access_token_prefix, placeholder: _('Maximum 20 characters'), class: 'form-control gl-form-input' diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index 8026ec4702b..41698f9720b 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -9,13 +9,13 @@ = s_('CICD|Default to Auto DevOps pipeline for all projects') .form-text.text-muted = s_('CICD|The Auto DevOps pipeline runs by default in all projects with no CI/CD configuration file.') - = link_to _('What is Auto DevOps?'), help_page_path('topics/autodevops/index.md'), target: '_blank' + = link_to _('What is Auto DevOps?'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer' .form-group = f.label :auto_devops_domain, s_('AdminSettings|Auto DevOps domain'), class: 'label-bold' = f.text_field :auto_devops_domain, class: 'form-control gl-form-input', placeholder: 'example.com' .form-text.text-muted = s_("AdminSettings|The default domain to use for Auto Review Apps and Auto Deploy stages in all projects.") - = link_to _('Learn more.'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-review-apps'), target: '_blank' + = link_to _('Learn more.'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-review-apps'), target: '_blank', rel: 'noopener noreferrer' .form-group .form-check @@ -68,7 +68,7 @@ = f.text_field :default_ci_config_path, class: 'form-control gl-form-input', placeholder: '.gitlab-ci.yml' %p.form-text.text-muted = _("The default CI/CD configuration file and path for new projects.").html_safe - = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'specify-a-custom-cicd-configuration-file'), target: '_blank' + = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'specify-a-custom-cicd-configuration-file'), target: '_blank', rel: 'noopener noreferrer' .form-group .form-check = f.check_box :suggest_pipeline_enabled, class: 'form-check-input' diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index 073c0bf619d..0ab462a3fa8 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -20,7 +20,7 @@ = f.label :commit_email_hostname, _('Custom hostname (for private commit emails)'), class: 'label-bold' = f.text_field :commit_email_hostname, class: 'form-control gl-form-input' .form-text.text-muted - - commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('user/admin_area/settings/email.md', anchor: 'custom-hostname-for-private-commit-emails'), target: '_blank' + - commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('user/admin_area/settings/email.md', anchor: 'custom-hostname-for-private-commit-emails'), target: '_blank', rel: 'noopener noreferrer' = _("Hostname used in private commit emails. %{learn_more}").html_safe % { learn_more: commit_email_hostname_docs_link } = render_if_exists 'admin/application_settings/email_additional_text_setting', form: f diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml index 23484eaec32..4fb10d48540 100644 --- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml +++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml @@ -1,11 +1,12 @@ %section.settings.as-external-auth.no-animate#js-external-auth-settings{ class: ('expanded' if expanded) } .settings-header %h4 - = _('External authentication') + = s_('ExternalAuthorization|External authorization') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - = _('External Classification Policy Authorization') + = s_('ExternalAuthorization|External classification policy authorization.') + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/external_authorization'), target: '_blank', rel: 'noopener noreferrer' .settings-content = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form', id: 'external-auth-settings' } do |f| @@ -16,35 +17,37 @@ .form-check = f.check_box :external_authorization_service_enabled, class: 'form-check-input' = f.label :external_authorization_service_enabled, class: 'form-check-label' do - = _('Enable classification control using an external service') + = s_('ExternalAuthorization|Enable classification control using an external service') %span.form-text.text-muted = external_authorization_description - = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/external_authorization') .form-group - = f.label :external_authorization_service_url, _('Service URL'), class: 'label-bold' + = f.label :external_authorization_service_url, s_('ExternalAuthorization|Service URL'), class: 'label-bold' = f.text_field :external_authorization_service_url, class: 'form-control gl-form-input' %span.form-text.text-muted = external_authorization_url_help_text .form-group - = f.label :external_authorization_service_timeout, _('External authorization request timeout'), class: 'label-bold' + = f.label :external_authorization_service_timeout, s_('ExternalAuthorization|External authorization request timeout (seconds)'), class: 'label-bold' = f.number_field :external_authorization_service_timeout, class: 'form-control gl-form-input', min: 0.001, max: 10, step: 0.001 %span.form-text.text-muted = external_authorization_timeout_help_text - = f.label :external_auth_client_cert, _('Client authentication certificate'), class: 'label-bold' + .form-group + = f.label :external_auth_client_cert, s_('ExternalAuthorization|Client authorization certificate'), class: 'label-bold' = f.text_area :external_auth_client_cert, class: 'form-control gl-form-input' %span.form-text.text-muted = external_authorization_client_certificate_help_text .form-group - = f.label :external_auth_client_key, _('Client authentication key'), class: 'label-bold' + = f.label :external_auth_client_key, s_('ExternalAuthorization|Client authorization key'), class: 'label-bold' = f.text_area :external_auth_client_key, class: 'form-control gl-form-input' %span.form-text.text-muted = external_authorization_client_key_help_text .form-group - = f.label :external_auth_client_key_pass, _('Client authentication key password'), class: 'label-bold' + = f.label :external_auth_client_key_pass, s_('ExternalAuthorization|Client authorization key password (optional)'), class: 'label-bold' = f.password_field :external_auth_client_key_pass, class: 'form-control gl-form-input' %span.form-text.text-muted = external_authorization_client_pass_help_text .form-group - = f.label :external_authorization_service_default_label, _('Default classification label'), class: 'label-bold' + = f.label :external_authorization_service_default_label, s_('ExternalAuthorization|Default classification label'), class: 'label-bold' = f.text_field :external_authorization_service_default_label, class: 'form-control gl-form-input' + %span.form-text.text-muted + = external_authorization_client_url_help_text = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_floc.html.haml b/app/views/admin/application_settings/_floc.html.haml index 52833b5cfc2..66259926064 100644 --- a/app/views/admin/application_settings/_floc.html.haml +++ b/app/views/admin/application_settings/_floc.html.haml @@ -8,7 +8,7 @@ = expanded ? _('Collapse') : _('Expand') %p = s_('FloC|Configure whether you want to participate in FloC.').html_safe - = link_to sprite_icon('question-o'), 'https://github.com/WICG/floc', target: '_blank', class: 'has-tooltip', title: _('More information') + = link_to sprite_icon('question-o'), 'https://github.com/WICG/floc', target: '_blank', rel: 'noopener noreferrer', class: 'has-tooltip', title: _('More information') .settings-content = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-floc-settings'), html: { class: 'fieldset-form', id: 'floc-settings' } do |f| diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml index 5c8f3379fce..d0bb6a78ed6 100644 --- a/app/views/admin/application_settings/_localization.html.haml +++ b/app/views/admin/application_settings/_localization.html.haml @@ -7,7 +7,7 @@ = f.select :first_day_of_week, first_day_of_week_choices, {}, class: 'form-control' .form-text.text-muted = _('Default first day of the week in calendars and date pickers.') - = link_to _('Learn more.'), help_page_path('user/admin_area/settings/index.md', anchor: 'default-first-day-of-the-week'), target: '_blank' + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/index.md', anchor: 'default-first-day-of-the-week'), target: '_blank', rel: 'noopener noreferrer' .form-group = f.label :time_tracking, _('Time tracking'), class: 'label-bold' @@ -17,7 +17,7 @@ = _('Limit display of time tracking units to hours.') .form-text.text-muted = _('Display time tracking in issues in total hours only.') - = link_to _('What is time tracking?'), help_page_path('user/project/time_tracking.md'), target: '_blank' + = link_to _('What is time tracking?'), help_page_path('user/project/time_tracking.md'), target: '_blank', rel: 'noopener noreferrer' = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml index 142a3fbfbd0..9a31fdd7fdf 100644 --- a/app/views/admin/application_settings/_outbound.html.haml +++ b/app/views/admin/application_settings/_outbound.html.haml @@ -6,25 +6,26 @@ .form-check = f.check_box :allow_local_requests_from_web_hooks_and_services, class: 'form-check-input', data: { qa_selector: 'allow_requests_from_services_checkbox' } = f.label :allow_local_requests_from_web_hooks_and_services, class: 'form-check-label' do - = _('Allow requests to the local network from web hooks and services') + = s_('OutboundRequests|Allow requests to the local network from web hooks and services') .form-check = f.check_box :allow_local_requests_from_system_hooks, class: 'form-check-input' = f.label :allow_local_requests_from_system_hooks, class: 'form-check-label' do - = _('Allow requests to the local network from system hooks') + = s_('OutboundRequests|Allow requests to the local network from system hooks') .form-group = f.label :outbound_local_requests_allowlist_raw, class: 'label-bold' do - = _('Local IP addresses and domain names that hooks and services may access.') - = f.text_area :outbound_local_requests_allowlist_raw, placeholder: "example.com, 192.168.1.1", class: 'form-control gl-form-input', rows: 8 + = s_('OutboundRequests|Local IP addresses and domain names that hooks and services may access') + = f.text_area :outbound_local_requests_allowlist_raw, placeholder: "example.com, 192.168.1.1, xn--itlab-j1a.com", class: 'form-control gl-form-input', rows: 8 %span.form-text.text-muted - = _('Requests to these domain(s)/address(es) on the local network will be allowed when local requests from hooks and services are not allowed. IP ranges such as 1:0:0:0:0:0:0:0/124 or 127.0.0.0/28 are supported. Domain wildcards are not supported currently. Use comma, semicolon, or newline to separate multiple entries. The allowlist can hold a maximum of 1000 entries. Domains should use IDNA encoding. Ex: example.com, 192.168.1.1, 127.0.0.0/28, xn--itlab-j1a.com.') + = s_('OutboundRequests|Requests to these domains and IP addresses are accessible to both system hooks and web hooks even when local requests are not allowed. IP ranges such as 1:0:0:0:0:0:0:0/124 and 127.0.0.0/28 are supported. Domain wildcards are not supported. To separate entries use commas, semicolons, or newlines. The allowlist can hold a maximum of 1000 entries. Domains must be IDNA encoded.') + = link_to _('Learn more.'), help_page_path('security/webhooks.md', anchor: 'allowlist-for-local-requests'), target: '_blank', rel: 'noopener noreferrer' .form-group .form-check = f.check_box :dns_rebinding_protection_enabled, class: 'form-check-input' = f.label :dns_rebinding_protection_enabled, class: 'form-check-label' do - = _('Enforce DNS rebinding attack protection') + = s_('OutboundRequests|Enforce DNS rebinding attack protection') %span.form-text.text-muted - = _('Resolves IP addresses once and uses them to submit requests') + = s_('OutboundRequests|Resolve IP addresses once and uses them to submit requests.') = f.submit _('Save changes'), class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml index 59690fdee8b..08befa59952 100644 --- a/app/views/admin/application_settings/_prometheus.html.haml +++ b/app/views/admin/application_settings/_prometheus.html.haml @@ -9,7 +9,7 @@ = _("Enable health and performance metrics endpoint") .form-text.text-muted = _('Enable a Prometheus endpoint that exposes health and performance statistics. The Health Check menu item appears in the Monitoring section of the Admin Area. Restart required.') - = link_to _('Learn More.'), help_page_path('administration/monitoring/prometheus/gitlab_metrics.md'), target: '_blank' + = link_to _('Learn More.'), help_page_path('administration/monitoring/prometheus/gitlab_metrics.md'), target: '_blank', rel: 'noopener noreferrer' - unless Gitlab::Metrics.metrics_folder_present? .form-text.text-muted %strong.cred= _("WARNING:") diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index 78d4e8c8cc3..b55c2f05300 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -10,10 +10,10 @@ = f.check_box :container_expiration_policies_enable_historic_entries, class: 'form-check-input' = f.label :container_expiration_policies_enable_historic_entries, class: 'form-check-label' do = _("Enable container expiration and retention policies for projects created earlier than GitLab 12.7.") - = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy') + = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy') .form-text.text-muted = _("Existing projects will be able to use expiration policies. Avoid enabling this if an external Container Registry is being used, as there is a performance risk if many images exist on one project.") - = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/index', anchor: 'use-with-external-container-registries') + = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'use-with-external-container-registries') - if container_registry_expiration_policies_throttling? .form-group = f.label :container_registry_delete_tags_service_timeout, _('Cleanup policy maximum processing time (seconds)'), class: 'label-bold' diff --git a/app/views/admin/application_settings/_runner_registrars_form.html.haml b/app/views/admin/application_settings/_runner_registrars_form.html.haml index b7ab896533b..08b3d173d20 100644 --- a/app/views/admin/application_settings/_runner_registrars_form.html.haml +++ b/app/views/admin/application_settings/_runner_registrars_form.html.haml @@ -11,6 +11,6 @@ = s_("Runners|Members of the %{type} can register runners") % { type: type } %span.form-text.gl-text-gray-600 = _('If no options are selected, only administrators can register runners.') - = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'runner-registration'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'prevent-users-from-registering-runners'), target: '_blank', rel: 'noopener noreferrer' = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_sourcegraph.html.haml b/app/views/admin/application_settings/_sourcegraph.html.haml index d87ded09a2b..b92cf7b156a 100644 --- a/app/views/admin/application_settings/_sourcegraph.html.haml +++ b/app/views/admin/application_settings/_sourcegraph.html.haml @@ -12,7 +12,7 @@ - link_end = "#{sprite_icon('external-link', size: 12, css_class: 'ml-1 vertical-align-center')}</a>".html_safe = s_('SourcegraphAdmin|Enable code intelligence powered by %{link_start}Sourcegraph%{link_end} on your GitLab instance\'s code views and merge requests.').html_safe % { link_start: link_start, link_end: link_end } %span - = link_to s_('SourcegraphAdmin|More information'), help_page_path('integration/sourcegraph.md'), target: '_blank' + = link_to s_('SourcegraphAdmin|More information'), help_page_path('integration/sourcegraph.md'), target: '_blank', rel: 'noopener noreferrer' .settings-content diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml index 53ca4d4aa79..27113fddb27 100644 --- a/app/views/admin/application_settings/_spam.html.haml +++ b/app/views/admin/application_settings/_spam.html.haml @@ -27,7 +27,7 @@ = f.text_field :recaptcha_site_key, class: 'form-control gl-form-input' .form-text.text-muted = _("Generate site and private keys at") - %a{ href: 'http://www.google.com/recaptcha', target: 'blank' } http://www.google.com/recaptcha + %a{ href: 'http://www.google.com/recaptcha', target: 'blank', rel: 'noopener noreferrer' } http://www.google.com/recaptcha .form-group = f.label :recaptcha_private_key, _('reCAPTCHA private key'), class: 'label-bold' @@ -65,7 +65,7 @@ = f.text_field :akismet_api_key, class: 'form-control gl-form-input' .form-text.text-muted Generate API key at - %a{ href: 'http://www.akismet.com', target: 'blank' } http://www.akismet.com + %a{ href: 'http://www.akismet.com', target: 'blank', rel: 'noopener noreferrer' } http://www.akismet.com %h5 = _('IP address restrictions') diff --git a/app/views/admin/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml index 9a34400092e..231c45ec46c 100644 --- a/app/views/admin/application_settings/_third_party_offers.html.haml +++ b/app/views/admin/application_settings/_third_party_offers.html.haml @@ -2,11 +2,11 @@ %section.settings.as-third-party-offers.no-animate#js-third-party-offers-settings{ class: ('expanded' if expanded) } .settings-header %h4 - = _('Third-party offers') + = _('Customer experience improvement and third-party offers') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - = _('Control whether to display third-party offers in GitLab.') + = _('Control whether to display customer experience improvement content and third-party offers in GitLab.') .settings-content = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form', id: 'third-party-offers-settings' } do |f| = form_errors(@application_setting) if expanded @@ -15,6 +15,6 @@ .form-group .form-check = f.check_box :hide_third_party_offers, class: 'form-check-input' - = f.label :hide_third_party_offers, _('Do not display offers from third parties'), class: 'form-check-label' + = f.label :hide_third_party_offers, _('Do not display content for customer experience improvement and offers from third parties'), class: 'form-check-label' = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/appearances/_form.html.haml b/app/views/admin/application_settings/appearances/_form.html.haml index 3bd16e4c344..0f7f0109a54 100644 --- a/app/views/admin/application_settings/appearances/_form.html.haml +++ b/app/views/admin/application_settings/appearances/_form.html.haml @@ -20,7 +20,7 @@ %hr = f.hidden_field :header_logo_cache = f.file_field :header_logo, class: "", accept: 'image/*' - .hint + .form-text.text-muted = _('Maximum file size is 1MB. Pages are optimized for a 28px tall header logo') %hr .row @@ -39,7 +39,7 @@ %hr = f.hidden_field :favicon_cache = f.file_field :favicon, class: '', accept: 'image/*' - .hint + .form-text.text-muted = _("Maximum file size is 1 MB. Image size must be 32 x 32 pixels. Allowed image formats are %{favicon_extension_whitelist}.") % { favicon_extension_whitelist: favicon_extension_whitelist } %br = _("Images with incorrect dimensions are not resized automatically, and may result in unexpected behavior.") @@ -58,7 +58,7 @@ .form-group = f.label :description, class: 'col-form-label label-bold' = f.text_area :description, class: "form-control gl-form-input", rows: 10 - .hint + .form-text.text-muted = parsed_with_gfm .form-group = f.label :logo, class: 'col-form-label label-bold pt-0' @@ -71,7 +71,7 @@ %hr = f.hidden_field :logo_cache = f.file_field :logo, class: "", accept: 'image/*' - .hint + .form-text.text-muted = _('Maximum file size is 1MB. Pages are optimized for a 640x360 px logo.') %hr @@ -84,7 +84,7 @@ = f.label :new_project_guidelines, class: 'col-form-label label-bold' %p = f.text_area :new_project_guidelines, class: "form-control gl-form-input", rows: 10 - .hint + .form-text.text-muted = parsed_with_gfm %hr @@ -97,7 +97,7 @@ = f.label :profile_image_guidelines, class: 'col-form-label label-bold' %p = f.text_area :profile_image_guidelines, class: "form-control gl-form-input", rows: 10 - .hint + .form-text.text-muted = parsed_with_gfm .gl-mt-3.gl-mb-3 diff --git a/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml b/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml index 4571d34a497..1ce79e61ac6 100644 --- a/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml +++ b/app/views/admin/application_settings/appearances/_system_header_footer_form.html.haml @@ -19,7 +19,7 @@ = form.label :email_header_and_footer_enabled, class: 'label-bold' do = _('Enable header and footer in emails') - .hint + .form-text.text-muted = _('Add header and footer to emails. Please note that color settings will only be applied within the application interface') .form-group.js-toggle-colors-container diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 53ba626760b..9eef4bc2a37 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -118,3 +118,4 @@ = render 'admin/application_settings/snowplow' = render 'admin/application_settings/eks' = render 'admin/application_settings/floc' += render_if_exists 'admin/application_settings/license_file' diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index 61a2f97764f..242d0c364f4 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -75,11 +75,13 @@ %section.settings.as-outbound.no-animate#js-outbound-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'outbound_requests_content' } } .settings-header %h4 - = _('Outbound requests') + = s_('OutboundRequests|Outbound requests') + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand') %p - = _('Allow requests to the local network from hooks and services.') + = s_('OutboundRequests|Allow requests to the local network from hooks and services.') + = link_to _('Learn more.'), help_page_path('security/webhooks.md'), target: '_blank', rel: 'noopener noreferrer' .settings-content = render 'outbound' diff --git a/app/views/admin/background_migrations/_migration.html.haml b/app/views/admin/background_migrations/_migration.html.haml index 4a7c0083bc7..b6077bc54d6 100644 --- a/app/views/admin/background_migrations/_migration.html.haml +++ b/app/views/admin/background_migrations/_migration.html.haml @@ -7,7 +7,7 @@ - else = _('Unknown') %td{ role: 'cell', data: { label: _('Status') } } - %span.badge.badge-pill.gl-badge.sm{ class: batched_migration_status_badge_class_name(migration) }= migration.status.humanize + = gl_badge_tag migration.status.humanize, { size: :sm, variant: batched_migration_status_badge_variant(migration) } %td{ role: 'cell', data: { label: _('Action') } } - if migration.active? = button_to pause_admin_background_migration_path(migration), diff --git a/app/views/admin/background_migrations/index.html.haml b/app/views/admin/background_migrations/index.html.haml index 9ccbdfb5f20..13ac511f1b4 100644 --- a/app/views/admin/background_migrations/index.html.haml +++ b/app/views/admin/background_migrations/index.html.haml @@ -8,18 +8,15 @@ %li.nav-item{ role: 'presentation' } %a.nav-link.gl-tab-nav-item{ href: admin_background_migrations_path, class: (active_tab_classes if @current_tab == 'queued'), role: 'tab' } = _('Queued') - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = limited_counter_with_delimiter(@relations_by_tab['queued']) + = gl_tab_counter_badge limited_counter_with_delimiter(@relations_by_tab['queued']) %li.nav-item{ role: 'presentation' } %a.nav-link.gl-tab-nav-item{ href: admin_background_migrations_path(tab: 'failed'), class: (active_tab_classes if @current_tab == 'failed'), role: 'tab' } = _('Failed') - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = limited_counter_with_delimiter(@relations_by_tab['failed']) + = gl_tab_counter_badge limited_counter_with_delimiter(@relations_by_tab['failed']) %li.nav-item{ role: 'presentation' } %a.nav-link.gl-tab-nav-item{ href: admin_background_migrations_path(tab: 'finished'), class: (active_tab_classes if @current_tab == 'finished'), role: 'tab' } = _('Finished') - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = limited_counter_with_delimiter(@relations_by_tab['finished']) + = gl_tab_counter_badge limited_counter_with_delimiter(@relations_by_tab['finished']) .tab-content.gl-tab-content .tab-pane.active{ role: 'tabpanel' } diff --git a/app/views/admin/cohorts/_cohorts_table.html.haml b/app/views/admin/cohorts/_cohorts_table.html.haml index a92cfb5851a..4e2292a9f67 100644 --- a/app/views/admin/cohorts/_cohorts_table.html.haml +++ b/app/views/admin/cohorts/_cohorts_table.html.haml @@ -2,7 +2,7 @@ .bs-callout.clearfix %p = s_("Cohorts|User cohorts are shown for the last %{months_included} months. Only users with activity are counted in the 'New users' column; inactive users are counted separately.") % { months_included: @cohorts[:months_included] } - = link_to sprite_icon('question-o'), help_page_path('user/admin_area/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank', rel: 'noopener noreferrer' .table-holder.d-xl-table %table.table diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 801b903395a..85b6ebfc63a 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -118,9 +118,9 @@ .gl-card-body %h4 = s_('AdminArea|Components') - - if Gitlab::CurrentSettings.version_check_enabled + - if show_version_check? .float-right - = version_status_badge + .js-gitlab-version-check{ data: { "size": "lg" } } = link_to(sprite_icon('question'), "https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md", class: 'gl-ml-2', target: '_blank', rel: 'noopener noreferrer') %p = link_to _('GitLab'), general_admin_application_settings_path diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml index ba4abdc02e4..de2a737faa1 100644 --- a/app/views/admin/deploy_keys/index.html.haml +++ b/app/views/admin/deploy_keys/index.html.haml @@ -1,44 +1,3 @@ - page_title _('Deploy Keys') -- if Feature.enabled?(:admin_deploy_keys_vue, default_enabled: :yaml) - #js-admin-deploy-keys-table{ data: admin_deploy_keys_data } -- else - - if @deploy_keys.any? - %h3.page-title.deploy-keys-title - = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size } - = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn gl-button btn-confirm btn-md gl-button' - %table.table.b-table.gl-table.b-table-stacked-lg{ data: { testid: 'deploy-keys-list' } } - %thead - %tr - %th= _('Title') - %th= _('Fingerprint') - %th= _('Projects with write access') - %th= _('Created') - %th.gl-lg-w-1px.gl-white-space-nowrap - %span.gl-sr-only - = _('Actions') - %tbody - - @deploy_keys.each do |deploy_key| - %tr - %td{ data: { label: _('Title') } } - %div - = deploy_key.title - %td{ data: { label: _('Fingerprint') } } - %div - %code= deploy_key.fingerprint - %td{ data: { label: _('Projects with write access') } } - %div - - deploy_key.projects_with_write_access.each do |project| - = link_to project.full_name, admin_project_path(project), class: 'gl-display-block' - %td{ data: { label: _('Created') } } - %div - = time_ago_with_tooltip(deploy_key.created_at) - %td.gl-lg-w-1px.gl-white-space-nowrap{ data: { label: _('Actions') } } - %div - = link_to edit_admin_deploy_key_path(deploy_key), class: 'btn btn-default btn-md gl-button btn-icon gl-mr-3', aria: { label: _('Edit deploy key') } do - = sprite_icon('pencil', css_class: 'gl-button-icon') - = link_to admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-danger btn-md gl-button btn-icon', aria: { label: _('Remove deploy key') } do - = sprite_icon('remove', css_class: 'gl-button-icon') - - - else - = render 'shared/empty_states/deploy_keys' +#js-admin-deploy-keys-table{ data: admin_deploy_keys_data } diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index bbc65850794..0c2280a2f63 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -15,8 +15,7 @@ = markdown_field(group, :description) .stats.gl-text-gray-500.gl-flex-shrink-0.gl-display-none.gl-sm-display-flex - %span.badge.badge-muted.badge-pill.gl-badge.sm - = storage_counter(group.storage_size) + = gl_badge_tag storage_counter(group.storage_size), size: :sm = render_if_exists 'admin/namespace_plan_badge', namespace: group, css_class: 'gl-ml-5 gl-mr-0' = render_if_exists 'admin/groups/marked_for_deletion_badge', group: group, css_class: 'gl-ml-5' diff --git a/app/views/admin/labels/_form.html.haml b/app/views/admin/labels/_form.html.haml deleted file mode 100644 index abf380474e4..00000000000 --- a/app/views/admin/labels/_form.html.haml +++ /dev/null @@ -1,31 +0,0 @@ -= form_for [:admin, @label], html: { class: 'label-form js-requires-input' } do |f| - = form_errors(@label) - - .form-group.row - .col-sm-2.col-form-label - = f.label :title - .col-sm-10 - = f.text_field :title, class: "form-control gl-form-input", required: true - .form-group.row - .col-sm-2.col-form-label - = f.label :description - .col-sm-10 - = f.text_field :description, class: "form-control gl-form-input js-quick-submit" - .form-group.row - .col-sm-2.col-form-label - = f.label :color, _("Background color") - .col-sm-10 - .input-group - .input-group-prepend - .input-group-text.label-color-preview - = f.text_field :color, class: "form-control gl-form-input" - .form-text.text-muted - = _('Choose any color.') - %br - = _("Or you can choose one of the suggested colors below") - - = render_suggested_colors - - .form-actions - = f.submit _('Save'), class: 'btn gl-button btn-confirm js-save-button' - = link_to _("Cancel"), admin_labels_path, class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/admin/labels/edit.html.haml b/app/views/admin/labels/edit.html.haml index 652ed095d00..44dd2b6a646 100644 --- a/app/views/admin/labels/edit.html.haml +++ b/app/views/admin/labels/edit.html.haml @@ -4,4 +4,4 @@ %h3.page-title = _('Edit Label') %hr -= render 'form' += render 'shared/labels/form', url: admin_label_path(@label), back_path: admin_labels_path diff --git a/app/views/admin/labels/new.html.haml b/app/views/admin/labels/new.html.haml index 20103fb8a29..5166bdb4d20 100644 --- a/app/views/admin/labels/new.html.haml +++ b/app/views/admin/labels/new.html.haml @@ -2,4 +2,4 @@ %h3.page-title = _('New Label') %hr -= render 'form' += render 'shared/labels/form', url: admin_labels_path, back_path: admin_labels_path diff --git a/app/views/admin/runners/edit.html.haml b/app/views/admin/runners/edit.html.haml new file mode 100644 index 00000000000..0257983016c --- /dev/null +++ b/app/views/admin/runners/edit.html.haml @@ -0,0 +1,99 @@ +- add_page_specific_style 'page_bundles/ci_status' + +- runner_name = "##{@runner.id} (#{@runner.short_sha})" +- if Feature.enabled?(:runner_read_only_admin_view) + - breadcrumb_title _('Edit') + - page_title _('Edit'), runner_name + - add_to_breadcrumbs _('Runners'), admin_runners_path + - add_to_breadcrumbs runner_name, admin_runner_path(@runner) +- else + - breadcrumb_title runner_name + - page_title runner_name + +#js-admin-runner-edit{ data: {runner_id: @runner.id} } + +.row + .col-md-6 + %h4= _('Restrict projects for this runner') + - if @runner.runner_projects.any? + %table.table{ data: { testid: 'assigned-projects' } } + %thead + %tr + %th= _('Assigned projects') + - @runner.runner_projects.each do |runner_project| + - project = runner_project.project + - if project + %tr + %td + .gl-alert.gl-alert-danger + .gl-alert-container + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-content + .gl-alert-body + %strong + = project.full_name + .gl-alert-actions + = link_to _('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-confirm btn-md gl-button' + + %table.table{ data: { testid: 'unassigned-projects' } } + %thead + %tr + %th= _('Project') + %th + + %tr + %td + = form_tag edit_admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do + .input-group + = search_field_tag :search, params[:search], class: 'form-control gl-form-input', spellcheck: false + .input-group-append + = submit_tag _('Search'), class: 'gl-button btn btn-default' + + %td + - @projects.each do |project| + %tr + %td + = project.full_name + %td + .float-right + = form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f| + = f.hidden_field :runner_id, value: @runner.id + = f.submit _('Enable'), aria: { label: s_('Runners|Change to project runner') }, class: 'gl-button btn btn-sm', data: { confirm: (s_('Runners|You are about to change this instance runner to a project runner. This operation is not reversible. Are you sure you want to continue?') if @runner.instance_type?), confirm_btn_variant: 'danger' } + = paginate_without_count @projects + + .col-md-6 + %h4= _('Recent jobs served by this runner') + %table.table.ci-table.runner-builds + %thead + %tr + %th= _('Job') + %th= _('Status') + %th= _('Project') + %th= _('Commit') + %th= _('Finished at') + + - @builds.each do |build| + - project = build.project + %tr.build + %td.id + - if project + = link_to project_job_path(project, build) do + %strong ##{build.id} + - else + %strong ##{build.id} + + %td.status + = render 'ci/status/badge', status: build.detailed_status(current_user) + + %td.status + - if project + = project.full_name + + %td.build-link + - if project + = link_to pipeline_path(build.pipeline) do + %strong= build.pipeline.short_sha + + %td.timestamp + - if build.finished_at + %span= time_ago_with_tooltip build.finished_at diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml index 808b2bb4f8e..7b4390ae463 100644 --- a/app/views/admin/runners/show.html.haml +++ b/app/views/admin/runners/show.html.haml @@ -1,93 +1,8 @@ - add_page_specific_style 'page_bundles/ci_status' -- breadcrumb_title @runner.short_sha -- page_title "##{@runner.id} (#{@runner.short_sha})" +- title = "##{@runner.id} (#{@runner.short_sha})" +- breadcrumb_title title +- page_title title - add_to_breadcrumbs _('Runners'), admin_runners_path -#js-runner-details{ data: {runner_id: @runner.id} } - -.row - .col-md-6 - %h4= _('Restrict projects for this runner') - - if @runner.runner_projects.any? - %table.table{ data: { testid: 'assigned-projects' } } - %thead - %tr - %th= _('Assigned projects') - - @runner.runner_projects.each do |runner_project| - - project = runner_project.project - - if project - %tr - %td - .gl-alert.gl-alert-danger - .gl-alert-container - = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content - .gl-alert-body - %strong - = project.full_name - .gl-alert-actions - = link_to _('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-confirm btn-md gl-button' - - %table.table{ data: { testid: 'unassigned-projects' } } - %thead - %tr - %th= _('Project') - %th - - %tr - %td - = form_tag admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do - .input-group - = search_field_tag :search, params[:search], class: 'form-control gl-form-input', spellcheck: false - .input-group-append - = submit_tag _('Search'), class: 'gl-button btn btn-default' - - %td - - @projects.each do |project| - %tr - %td - = project.full_name - %td - .float-right - = form_for project.runner_projects.new, url: admin_namespace_project_runner_projects_path(project.namespace, project), method: :post do |f| - = f.hidden_field :runner_id, value: @runner.id - = f.submit _('Enable'), class: 'gl-button btn btn-sm', data: { confirm: (s_('Runners|You are about to change this instance runner to a project runner. This operation is not reversible. Are you sure you want to continue?') if @runner.instance_type?) } - = paginate_without_count @projects - - .col-md-6 - %h4= _('Recent jobs served by this runner') - %table.table.ci-table.runner-builds - %thead - %tr - %th= _('Job') - %th= _('Status') - %th= _('Project') - %th= _('Commit') - %th= _('Finished at') - - - @builds.each do |build| - - project = build.project - %tr.build - %td.id - - if project - = link_to project_job_path(project, build) do - %strong ##{build.id} - - else - %strong ##{build.id} - - %td.status - = render 'ci/status/badge', status: build.detailed_status(current_user) - - %td.status - - if project - = project.full_name - - %td.build-link - - if project - = link_to pipeline_path(build.pipeline) do - %strong= build.pipeline.short_sha - - %td.timestamp - - if build.finished_at - %span= time_ago_with_tooltip build.finished_at +-# Empty view in development behind feature flag runner_read_only_admin_view diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index bafb2085589..ca14d898d79 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -3,23 +3,26 @@ %h3.page-title.gl-m-0 = @user.name - if @user.blocked_pending_approval? - %span.cred + %span.gl-text-red-500 = s_('AdminUsers|(Pending approval)') - elsif @user.banned? - %span.cred + %span.gl-text-red-500 = s_('AdminUsers|(Banned)') - elsif @user.blocked? - %span.cred + %span.gl-text-red-500 = s_('AdminUsers|(Blocked)') - if @user.internal? - %span.cred + %span.gl-text-red-500 = s_('AdminUsers|(Internal)') - if @user.admin - %span.cred + %span.gl-text-red-500 = s_('AdminUsers|(Admin)') - if @user.deactivated? - %span.cred + %span.gl-text-red-500 = s_('AdminUsers|(Deactivated)') + - if @user.access_locked? + %span.gl-text-red-500 + = s_('AdminUsers|(Locked)') = render_if_exists 'admin/users/auditor_user_badge' = render_if_exists 'admin/users/gma_user_badge' diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index e62e4cfa192..5edd5403d49 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -1,3 +1,11 @@ +- if registration_features_can_be_prompted? + = render 'shared/global_alert', + variant: :tip, + alert_class: 'gl-my-5', + dismissible: false do + .gl-alert-body + = render 'shared/registration_features_discovery_message', feature_title: s_('RegistrationFeatures|send emails to users') + .top-area.scrolling-tabs-container.inner-page-scroll-tabs .fade-left = sprite_icon('chevron-lg-left', size: 12) @@ -51,7 +59,7 @@ = hidden_field_tag :sort, @sort = sprite_icon('search', css_class: 'search-icon') = button_tag s_('AdminUsers|Search users') if Rails.env.test? - .dropdown.user-sort-dropdown + .dropdown.gl-ml-3 = label_tag 'Sort by', nil, class: 'label-bold' - toggle_text = @sort.present? ? users_sort_options_hash[@sort] : sort_title_name = dropdown_toggle(toggle_text, { toggle: 'dropdown' }) diff --git a/app/views/admin/users/projects.html.haml b/app/views/admin/users/projects.html.haml index b47ed38f65f..f51ac40df4f 100644 --- a/app/views/admin/users/projects.html.haml +++ b/app/views/admin/users/projects.html.haml @@ -5,7 +5,7 @@ - if @user.groups.any? .card - .card-header= _('Group projects') + .card-header= _('Groups') %ul.hover-list - @user.group_members.includes(:source).each do |group_member| # rubocop: disable CodeReuse/ActiveRecord - group = group_member.group |