From 6438df3a1e0fb944485cebf07976160184697d72 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 20 Jan 2021 13:34:23 -0600 Subject: Add latest changes from gitlab-org/gitlab@13-8-stable-ee --- .../admin/abuse_reports/_abuse_report.html.haml | 4 +- .../admin/application_settings/_gitpod.html.haml | 1 - .../application_settings/_ip_limits.html.haml | 7 +++ .../admin/application_settings/_signup.html.haml | 2 +- .../admin/application_settings/_spam.html.haml | 8 +++ .../admin/application_settings/_usage.html.haml | 2 +- .../admin/application_settings/reporting.html.haml | 2 +- app/views/admin/background_jobs/show.html.haml | 2 +- app/views/admin/dev_ops_report/_report.html.haml | 2 +- app/views/admin/dev_ops_report/show.html.haml | 2 +- app/views/admin/groups/show.html.haml | 10 ++-- app/views/admin/hooks/_form.html.haml | 65 ++++++++-------------- app/views/admin/jobs/index.html.haml | 2 + app/views/admin/runners/index.html.haml | 26 ++++----- app/views/admin/runners/show.html.haml | 32 ++++++----- app/views/admin/system_info/show.html.haml | 28 +++++++--- app/views/admin/users/_admin_notes.html.haml | 2 +- app/views/admin/users/index.html.haml | 3 +- 18 files changed, 108 insertions(+), 92 deletions(-) (limited to 'app/views/admin') diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml index ae0da214fb7..c3d7fac6df7 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -12,7 +12,9 @@ = _('(removed)') %td %strong.subheading.d-block.d-sm-none - = _('Reported by %{reporter}') % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } + = _('Reported by %{reporter}').html_safe % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } + .light.gl-display-none.gl-display-sm-block + = link_to(reporter.name, reporter) .light.small = time_ago_with_tooltip(abuse_report.created_at) %td diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index 1baec07fa25..7f78cce4575 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -1,4 +1,3 @@ -- return unless Gitlab::Gitpod.feature_available? - expanded = integration_expanded?('gitpod_') %section.settings.no-animate#js-gitpod-settings{ class: ('expanded' if expanded) } diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml index b06070d15d4..11ffe3f56e3 100644 --- a/app/views/admin/application_settings/_ip_limits.html.haml +++ b/app/views/admin/application_settings/_ip_limits.html.haml @@ -49,5 +49,12 @@ .form-group = f.label :throttle_authenticated_web_period_in_seconds, 'Authenticated web rate limit period in seconds', class: 'label-bold' = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control' + %hr + %h5 + = _('Response text') + .form-group + = f.label :rate_limiting_response_text, class: 'label-bold' do + = _('A plain-text response to show to clients that hit the rate limit.') + = f.text_area :rate_limiting_response_text, placeholder: ::Gitlab::Throttle::DEFAULT_RATE_LIMITING_RESPONSE_TEXT, class: 'form-control', rows: 5 = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml index 2f2d42e297e..92477dff3d8 100644 --- a/app/views/admin/application_settings/_signup.html.haml +++ b/app/views/admin/application_settings/_signup.html.haml @@ -4,7 +4,7 @@ %fieldset .form-group .form-check - = f.check_box :signup_enabled, class: 'form-check-input' + = f.check_box :signup_enabled, class: 'form-check-input', data: { qa_selector: 'signup_enabled_checkbox' } = f.label :signup_enabled, class: 'form-check-label' do Sign-up enabled .form-text.text-muted diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml index b54f1d7c829..2b871d3693c 100644 --- a/app/views/admin/application_settings/_spam.html.haml +++ b/app/views/admin/application_settings/_spam.html.haml @@ -28,6 +28,14 @@ .form-group = f.text_field :recaptcha_private_key, class: 'form-control' + .form-group + .form-check + = f.check_box :invisible_captcha_enabled, class: 'form-check-input' + = f.label :invisible_captcha_enabled, class: 'form-check-label' do + = _('Enable Invisible Captcha during sign up') + %span.form-text.text-muted + = _('Helps prevent bots from creating accounts.') + .form-group .form-check = f.check_box :akismet_enabled, class: 'form-check-input' diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 2ba7dcefd44..fe83d4b807c 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -33,7 +33,7 @@ %pre.usage-data.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else = _('The usage ping is disabled, and cannot be configured through this form.') - - deactivating_usage_ping_path = help_page_path('development/product_analytics/usage_ping', anchor: 'disable-usage-ping') + - deactivating_usage_ping_path = help_page_path('development/usage_ping', anchor: 'disable-usage-ping') - deactivating_usage_ping_link_start = ''.html_safe % { url: deactivating_usage_ping_path } = s_('For more information, see the documentation on %{deactivating_usage_ping_link_start}deactivating the usage ping%{deactivating_usage_ping_link_end}.').html_safe % { deactivating_usage_ping_link_start: deactivating_usage_ping_link_start, deactivating_usage_ping_link_end: ''.html_safe } diff --git a/app/views/admin/application_settings/reporting.html.haml b/app/views/admin/application_settings/reporting.html.haml index c60e44b3864..6ea139844d4 100644 --- a/app/views/admin/application_settings/reporting.html.haml +++ b/app/views/admin/application_settings/reporting.html.haml @@ -11,7 +11,7 @@ %p - recaptcha_v2_link_url = 'https://developers.google.com/recaptcha/docs/versions' - recaptcha_v2_link_start = ''.html_safe % { url: recaptcha_v2_link_url } - = _('Enable reCAPTCHA or Akismet and set IP limits. For reCAPTCHA, we currently only support %{recaptcha_v2_link_start}v2%{recaptcha_v2_link_end}').html_safe % { recaptcha_v2_link_start: recaptcha_v2_link_start, recaptcha_v2_link_end: ''.html_safe } + = _('Enable reCAPTCHA, Invisible Captcha, Akismet and set IP limits. For reCAPTCHA, we currently only support %{recaptcha_v2_link_start}v2%{recaptcha_v2_link_end}').html_safe % { recaptcha_v2_link_start: recaptcha_v2_link_start, recaptcha_v2_link_end: ''.html_safe } .settings-content = render 'spam' diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index bbb47e29bb9..9ba72caa88e 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -4,5 +4,5 @@ %p.light GitLab uses #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing %hr -.card +.card.gl-rounded-0 %iframe{ src: sidekiq_path, width: '100%', height: 970, style: "border: 0" } diff --git a/app/views/admin/dev_ops_report/_report.html.haml b/app/views/admin/dev_ops_report/_report.html.haml index 24c805d273a..5faadd15ef8 100644 --- a/app/views/admin/dev_ops_report/_report.html.haml +++ b/app/views/admin/dev_ops_report/_report.html.haml @@ -4,7 +4,7 @@ = render 'callout' - if !usage_ping_enabled - #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/product_analytics/usage_ping') } } + #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/usage_ping') } } - elsif @metric.blank? = render 'no_data' - else diff --git a/app/views/admin/dev_ops_report/show.html.haml b/app/views/admin/dev_ops_report/show.html.haml index 75398f3aa21..c16ef7af76d 100644 --- a/app/views/admin/dev_ops_report/show.html.haml +++ b/app/views/admin/dev_ops_report/show.html.haml @@ -3,7 +3,7 @@ .container .gl-mt-3 - - if Gitlab.ee? && Feature.enabled?(:devops_adoption_feature, default_enabled: true) && License.feature_available?(:devops_adoption) + - if show_adoption? = render_if_exists 'admin/dev_ops_report/devops_tabs' - else = render 'report' diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 386df99717b..b949d08718a 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -80,8 +80,9 @@ = storage_counter(project.statistics.storage_size) %span.float-right.light %span.monospace= project.full_path + '.git' - .card-footer - = paginate @projects, param_name: 'projects_page', theme: 'gitlab' + - unless @projects.size < Kaminari.config.default_per_page + .card-footer + = paginate @projects, param_name: 'projects_page', theme: 'gitlab' - shared_projects = @group.shared_projects.sort_by(&:name) - unless shared_projects.empty? @@ -134,5 +135,6 @@ group: @group, show_controls: false, current_user_is_group_owner: current_user_is_group_owner } - .card-footer - = paginate @members, param_name: 'members_page', theme: 'gitlab' + - unless @members.size < Kaminari.config.default_per_page + .card-footer + = paginate @members, param_name: 'members_page', theme: 'gitlab' diff --git a/app/views/admin/hooks/_form.html.haml b/app/views/admin/hooks/_form.html.haml index 5bc5404fada..e6abd8ff85a 100644 --- a/app/views/admin/hooks/_form.html.haml +++ b/app/views/admin/hooks/_form.html.haml @@ -1,52 +1,33 @@ = form_errors(hook) .form-group - = form.label :url, 'URL', class: 'label-bold' + = form.label :url, _('URL'), class: 'label-bold' = form.text_field :url, class: 'form-control' .form-group - = form.label :token, 'Secret Token', class: 'label-bold' + = form.label :token, _('Secret Token'), class: 'label-bold' = form.text_field :token, class: 'form-control' - %p.form-text.text-muted - Use this token to validate received payloads + %p.form-text.text-muted= _('Use this token to validate received payloads') .form-group - = form.label :url, 'Trigger', class: 'label-bold' - %ul.list-unstyled - %li - .form-text.text-muted - System hook will be triggered on set of events like creating project - or adding ssh key. But you can also enable extra triggers like Push events. - - .gl-mt-3 - = form.check_box :repository_update_events, class: 'float-left' - .gl-ml-6 - = form.label :repository_update_events, class: 'list-label' do - %strong Repository update events - %p.light - This URL will be triggered when repository is updated - %li - = form.check_box :push_events, class: 'float-left' - .gl-ml-6 - = form.label :push_events, class: 'list-label' do - %strong Push events - %p.light - This URL will be triggered for each branch updated to the repository - %li - = form.check_box :tag_push_events, class: 'float-left' - .gl-ml-6 - = form.label :tag_push_events, class: 'list-label' do - %strong Tag push events - %p.light - This URL will be triggered when a new tag is pushed to the repository - %li - = form.check_box :merge_requests_events, class: 'float-left' - .gl-ml-6 - = form.label :merge_requests_events, class: 'list-label' do - %strong Merge request events - %p.light - This URL will be triggered when a merge request is created/updated/merged + = form.label :url, _('Trigger'), class: 'label-bold' + .form-text.text-secondary.gl-mb-5= _('System hook will be triggered on set of events like creating project or adding ssh key. But you can also enable extra triggers like Push events.') + %fieldset.form-group.form-check + = form.check_box :repository_update_events, class: 'form-check-input' + = form.label :repository_update_events, _('Repository update events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered when repository is updated') + %fieldset.form-group.form-check + = form.check_box :push_events, class: 'form-check-input' + = form.label :push_events, _('Push events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered for each branch updated to the repository') + %fieldset.form-group.form-check + = form.check_box :tag_push_events, class: 'form-check-input' + = form.label :tag_push_events, _('Tag push events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered when a new tag is pushed to the repository') + %fieldset.form-group.form-check + = form.check_box :merge_requests_events, class: 'form-check-input' + = form.label :merge_requests_events, _('Merge request events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered when a merge request is created/updated/merged') .form-group - = form.label :enable_ssl_verification, 'SSL verification', class: 'label-bold checkbox' + = form.label :enable_ssl_verification, _('SSL verification'), class: 'label-bold checkbox' .form-check = form.check_box :enable_ssl_verification, class: 'form-check-input' - = form.label :enable_ssl_verification, class: 'form-check-label' do - %strong Enable SSL verification + = form.label :enable_ssl_verification, _('Enable SSL verification'), class: 'label-bold form-check-label' diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index 8eaf84c8df9..ce377eeea54 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -1,3 +1,5 @@ +- add_page_specific_style 'page_bundles/ci_status' + - breadcrumb_title _("Jobs") - page_title _("Jobs") diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 3d3b8c28a17..9f19d3f5d4e 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -5,34 +5,34 @@ .col-sm-6 .bs-callout %p - = (_"A 'Runner' is a process which runs a job. You can set up as many Runners as you need.") + = (_"Runners are processes that pick up and execute CI/CD jobs for GitLab.") %br - = _('Runners can be placed on separate users, servers, even on your local machine.') + = _('You can register runners as separate users, on separate servers, and on your local machine. Register as many runners as you want.') %br %div - %span= _('Each Runner can be in one of the following states and/or belong to one of the following types:') + %span= _('Runners can be:') %ul %li - %span.badge.badge-success shared + %span.badge.badge-pill.gl-badge.sm.badge-success shared \- - = _('Runner runs jobs from all unassigned projects') + = _('Runs jobs from all unassigned projects.') %li - %span.badge.badge-success group + %span.badge.badge-pill.gl-badge.sm.badge-success group \- - = _('Runner runs jobs from all unassigned projects in its group') + = _('Runs jobs from all unassigned projects in its group.') %li - %span.badge.badge-info specific + %span.badge.badge-pill.gl-badge.sm.badge-info specific \- - = _('Runner runs jobs from assigned projects') + = _('Runs jobs from assigned projects.') %li - %span.badge.badge-warning locked + %span.badge.badge-pill.gl-badge.sm.badge-warning locked \- - = _('Runner cannot be assigned to other projects') + = _('Cannot be assigned to other projects.') %li - %span.badge.badge-danger paused + %span.badge.badge-pill.gl-badge.sm.badge-danger paused \- - = _('Runner will not receive any new jobs') + = _('Not available to run jobs.') .col-sm-6 .bs-callout diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml index 06925964dc5..aca50de3852 100644 --- a/app/views/admin/runners/show.html.haml +++ b/app/views/admin/runners/show.html.haml @@ -1,3 +1,5 @@ +- add_page_specific_style 'page_bundles/ci_status' + = content_for :title do %h3.project-title Runner ##{@runner.id} @@ -15,17 +17,17 @@ - if @runner.instance_type? .bs-callout.bs-callout-success - %h4 This Runner will process jobs from ALL UNASSIGNED projects + %h4= _('This runner processes jobs for all unassigned projects.') %p - If you want Runners to build only specific projects, enable them in the table below. - Keep in mind that this is a one way transition. + = _('If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.') - elsif @runner.group_type? .bs-callout.bs-callout-success - %h4 This runner will process jobs from all projects in its group and subgroups + %h4= _('This runner processes jobs for all projects in its group and subgroups.') - else .bs-callout.bs-callout-info - %h4 This Runner will process jobs only from ASSIGNED projects - %p You can't make this a shared Runner. + %h4= _('This runner processes jobs for assigned projects only.') + %p + = _('You cannot make this a shared runner.') %hr .gl-mb-6 @@ -33,12 +35,12 @@ .row .col-md-6 - %h4 Restrict projects for this Runner + %h4= _('Restrict projects for this runner') - if @runner.projects.any? %table.table.assigned-projects %thead %tr - %th Assigned projects + %th= _('Assigned projects') - @runner.runner_projects.each do |runner_project| - project = runner_project.project - if project @@ -55,7 +57,7 @@ %table.table.unassigned-projects %thead %tr - %th Project + %th= _('Project') %th %tr @@ -78,15 +80,15 @@ = paginate_without_count @projects .col-md-6 - %h4 Recent jobs served by this Runner + %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 + %th= _('Job') + %th= _('Status') + %th= _('Project') + %th= _('Commit') + %th= _('Finished at') - @builds.each do |build| - project = build.project diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml index ca6efe9b095..7a34972dfbf 100644 --- a/app/views/admin/system_info/show.html.haml +++ b/app/views/admin/system_info/show.html.haml @@ -3,29 +3,41 @@ .gl-mt-3 .row .col-sm - .bg-light.light-well - %h4= _('CPU') + .bg-light.info-well.p-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('pod', size: 18, css_class: 'pod-icon gl-mr-3') + = _('CPU') .data - if @cpus %h2= _('%{cores} cores') % { cores: @cpus.length } - else = sprite_icon('warning-solid', css_class: 'text-warning') = _('Unable to collect CPU info') - .bg-light.light-well.gl-mt-3 - %h4= _('Memory Usage') + .bg-light.info-well.p-3.gl-mt-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('status-health', size: 18, css_class: 'pod-icon gl-mr-3') + = _('Memory Usage') .data - if @memory %h2 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)} - else = sprite_icon('warning-solid', css_class: 'text-warning') = _('Unable to collect memory info') - .bg-light.light-well.gl-mt-3 - %h4= _('Uptime') + .bg-light.info-well.p-3.gl-mt-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('clock', size: 18, css_class: 'pod-icon gl-mr-3') + = _('Uptime') .data %h2= distance_of_time_in_words_to_now(Rails.application.config.booted_at) .col-sm - .bg-light.light-well - %h4= _('Disk Usage') + .bg-light.info-well.p-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('disk', size: 18, css_class: 'pod-icon gl-mr-3') + = _('Disk Usage') .data %ul - @disks.each do |disk| diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index 5d91ba1a1ca..4da70a504f7 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -1,7 +1,7 @@ %fieldset %legend= _('Admin notes') .form-group.row - .col-sm-2.col-form-label.text-right + .col-sm-2.col-form-label = f.label :note, s_('AdminNote|Note') .col-sm-10 = f.text_area :note, class: 'form-control' diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index b86abb893a9..cef16b1881e 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -44,6 +44,7 @@ %small.badge.badge-pill= limited_counter_with_delimiter(User.without_projects) .nav-controls = render_if_exists 'admin/users/admin_email_users' + = render_if_exists 'admin/users/admin_export_user_permissions' = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-success btn-search float-right' .filtered-search-block.row-content-block.border-top-0 @@ -51,7 +52,7 @@ - if params[:filter].present? = hidden_field_tag "filter", h(params[:filter]) .search-holder - .search-field-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' } - if @sort.present? = hidden_field_tag :sort, @sort -- cgit v1.2.1