From 85dc423f7090da0a52c73eb66faf22ddb20efff9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 19 Sep 2020 01:45:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-4-stable-ee --- .../admin/abuse_reports/_abuse_report.html.haml | 25 +++++------ app/views/admin/appearances/_form.html.haml | 8 ++-- .../_system_header_footer_form.html.haml | 2 +- .../admin/appearances/preview_sign_in.html.haml | 2 +- .../admin/application_settings/_ci_cd.html.haml | 6 +-- .../application_settings/_diff_limits.html.haml | 2 +- .../_external_authorization_service_form.html.haml | 2 +- .../admin/application_settings/_gitpod.html.haml | 30 +++++++++++++ .../admin/application_settings/_grafana.html.haml | 2 +- .../_package_registry.html.haml | 50 ++++++++++++++++++++++ .../admin/application_settings/_pages.html.haml | 4 +- .../application_settings/_performance.html.haml | 2 +- .../application_settings/_prometheus.html.haml | 4 +- .../admin/application_settings/_realtime.html.haml | 3 +- .../admin/application_settings/_registry.html.haml | 10 ++++- .../_repository_mirrors_form.html.haml | 2 +- .../_repository_storage.html.haml | 2 +- .../admin/application_settings/_signin.html.haml | 2 +- .../admin/application_settings/_snowplow.html.haml | 3 -- .../admin/application_settings/_usage.html.haml | 13 +++--- .../application_settings/ci/_header.html.haml | 2 +- .../admin/application_settings/general.html.haml | 1 + .../application_settings/integrations.html.haml | 2 +- .../metrics_and_profiling.html.haml | 2 +- app/views/admin/applications/_form.html.haml | 5 --- app/views/admin/cohorts/_cohorts_table.html.haml | 35 +++++++++++++++ app/views/admin/cohorts/index.html.haml | 7 +++ app/views/admin/dashboard/index.html.haml | 50 ++++++++++------------ app/views/admin/dev_ops_report/_callout.html.haml | 13 ++++++ app/views/admin/dev_ops_report/_card.html.haml | 25 +++++++++++ app/views/admin/dev_ops_report/_no_data.html.haml | 7 +++ app/views/admin/dev_ops_report/show.html.haml | 33 ++++++++++++++ app/views/admin/groups/_form.html.haml | 6 ++- app/views/admin/groups/_group.html.haml | 2 +- app/views/admin/groups/show.html.haml | 2 +- app/views/admin/health_check/show.html.haml | 2 +- .../admin/instance_statistics/index.html.haml | 4 ++ app/views/admin/projects/_projects.html.haml | 5 +-- app/views/admin/projects/show.html.haml | 4 +- app/views/admin/runners/_runner.html.haml | 2 +- app/views/admin/runners/index.html.haml | 2 +- app/views/admin/runners/update.js.haml | 2 - app/views/admin/services/_form.html.haml | 5 +-- app/views/admin/services/index.html.haml | 19 ++++++++ app/views/admin/sessions/_two_factor_otp.html.haml | 2 +- app/views/admin/sessions/two_factor.html.haml | 4 +- app/views/admin/users/_form.html.haml | 6 +-- app/views/admin/users/_modals.html.haml | 2 +- app/views/admin/users/_user.html.haml | 12 +++--- app/views/admin/users/index.html.haml | 2 +- app/views/admin/users/new.html.haml | 2 +- app/views/admin/users/projects.html.haml | 8 ++-- app/views/admin/users/show.html.haml | 26 ++++++----- 53 files changed, 343 insertions(+), 132 deletions(-) create mode 100644 app/views/admin/application_settings/_gitpod.html.haml create mode 100644 app/views/admin/application_settings/_package_registry.html.haml create mode 100644 app/views/admin/cohorts/_cohorts_table.html.haml create mode 100644 app/views/admin/cohorts/index.html.haml create mode 100644 app/views/admin/dev_ops_report/_callout.html.haml create mode 100644 app/views/admin/dev_ops_report/_card.html.haml create mode 100644 app/views/admin/dev_ops_report/_no_data.html.haml create mode 100644 app/views/admin/dev_ops_report/show.html.haml create mode 100644 app/views/admin/instance_statistics/index.html.haml delete mode 100644 app/views/admin/runners/update.js.haml (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 89a87f38968..5ed9a0d1adb 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -2,33 +2,30 @@ - user = abuse_report.user %tr %th.d-block.d-sm-none.d-md-none - %strong User + %strong= _('User') %td - if user = link_to user.name, user .light.small - Joined #{time_ago_with_tooltip(user.created_at)} + = _('Joined %{time_ago}').html_safe % { time_ago: time_ago_with_tooltip(user.created_at) } - else - (removed) + = _('(removed)') %td - %strong.subheading.d-block.d-sm-none.d-md-none Reported by - - if reporter - = link_to reporter.name, reporter - - else - (removed) + %strong.subheading.d-block.d-sm-none.d-md-none + = _('Reported by %{reporter}') % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } .light.small = time_ago_with_tooltip(abuse_report.created_at) %td - %strong.subheading.d-block.d-sm-none.d-md-none Message + %strong.subheading.d-block.d-sm-none.d-md-none= _('Message') .message = markdown_field(abuse_report, :message) %td - if user - = link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true), - data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, remote: true, method: :delete, class: "btn btn-sm btn-block btn-remove js-remove-tr" + = link_to _('Remove user & report'), admin_abuse_report_path(abuse_report, remove_user: true), + data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "btn btn-sm btn-block btn-remove js-remove-tr" - if user && !user.blocked? - = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm btn-block" + = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "btn btn-sm btn-block" - else .btn.btn-sm.disabled.btn-block - Already blocked - = link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-block btn-close js-remove-tr" + = _('Already blocked') + = link_to _('Remove report'), [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-block btn-close js-remove-tr" diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml index fcb1c1a6f3e..ad3795445d1 100644 --- a/app/views/admin/appearances/_form.html.haml +++ b/app/views/admin/appearances/_form.html.haml @@ -16,7 +16,7 @@ = image_tag @appearance.header_logo_path, class: 'appearance-light-logo-preview' - if @appearance.persisted? %br - = link_to 'Remove header logo', header_logos_admin_appearances_path, data: { confirm: "Header logo will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo" + = link_to 'Remove header logo', header_logos_admin_appearances_path, data: { confirm: "Header logo will be removed. Are you sure?"}, method: :delete, class: "btn gl-button btn-danger btn-danger-secondary btn-sm" %hr = f.hidden_field :header_logo_cache = f.file_field :header_logo, class: "" @@ -35,7 +35,7 @@ = image_tag @appearance.favicon_path, class: 'appearance-light-logo-preview' - if @appearance.persisted? %br - = link_to 'Remove favicon', favicon_admin_appearances_path, data: { confirm: "Favicon will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo" + = link_to 'Remove favicon', favicon_admin_appearances_path, data: { confirm: "Favicon will be removed. Are you sure?"}, method: :delete, class: "btn gl-button btn-danger btn-danger-secondary btn-sm" %hr = f.hidden_field :favicon_cache = f.file_field :favicon, class: '' @@ -67,7 +67,7 @@ = image_tag @appearance.logo_path, class: 'appearance-logo-preview' - if @appearance.persisted? %br - = link_to 'Remove logo', logo_admin_appearances_path, data: { confirm: "Logo will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo" + = link_to 'Remove logo', logo_admin_appearances_path, data: { confirm: "Logo will be removed. Are you sure?"}, method: :delete, class: "btn gl-button btn-danger btn-danger-secondary btn-sm remove-logo" %hr = f.hidden_field :logo_cache = f.file_field :logo, class: "" @@ -101,7 +101,7 @@ = parsed_with_gfm .gl-mt-3.gl-mb-3 - = f.submit 'Update appearance settings', class: 'btn btn-success' + = f.submit 'Update appearance settings', class: 'btn gl-button btn-success' - if @appearance.persisted? || @appearance.updated_at .mt-4 - if @appearance.persisted? diff --git a/app/views/admin/appearances/_system_header_footer_form.html.haml b/app/views/admin/appearances/_system_header_footer_form.html.haml index 7f53b2baa32..b50778a1076 100644 --- a/app/views/admin/appearances/_system_header_footer_form.html.haml +++ b/app/views/admin/appearances/_system_header_footer_form.html.haml @@ -23,7 +23,7 @@ = _('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 - %button.btn.btn-link.js-toggle-colors-link{ type: 'button' } + %button.btn.gl-button.btn-link.js-toggle-colors-link{ type: 'button' } = _('Customize colors') .form-group.js-toggle-colors-container.hide = form.label :message_background_color, _('Background Color'), class: 'col-form-label label-bold' diff --git a/app/views/admin/appearances/preview_sign_in.html.haml b/app/views/admin/appearances/preview_sign_in.html.haml index 2cd95071c73..eec4719c13c 100644 --- a/app/views/admin/appearances/preview_sign_in.html.haml +++ b/app/views/admin/appearances/preview_sign_in.html.haml @@ -8,5 +8,5 @@ = label_tag :password = password_field_tag :password, nil, class: "form-control bottom", title: 'This field is required.' .form-group - = button_tag "Sign in", class: "btn-success btn" + = button_tag "Sign in", class: "btn gl-button btn-success" diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index 7051b790fb7..b9cce6c8085 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -34,13 +34,13 @@ = f.number_field :max_artifacts_size, class: 'form-control' .form-text.text-muted = _("Set the maximum file size for each job's artifacts") - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size-core-only') + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size') .form-group = f.label :default_artifacts_expire_in, _('Default artifacts expiration'), class: 'label-bold' = f.text_field :default_artifacts_expire_in, class: 'form-control' .form-text.text-muted = html_escape(_("Set the default expiration time for each job's artifacts. 0 for unlimited. The default unit is in seconds, but you can define an alternative. For example: %{code_open}4 mins 2 sec%{code_close}, %{code_open}2h42min%{code_close}.")) % { code_open: ''.html_safe, code_close: ''.html_safe } - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration-core-only') + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration') .form-group = f.label :archive_builds_in_human_readable, _('Archive jobs'), class: 'label-bold' = f.text_field :archive_builds_in_human_readable, class: 'form-control', placeholder: 'never' @@ -58,6 +58,6 @@ = f.text_field :default_ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml' %p.form-text.text-muted = _("The default CI configuration path for new projects.").html_safe - = link_to icon('question-circle'), help_page_path('ci/pipelines/settings', anchor: 'custom-ci-configuration-path'), target: '_blank' + = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'custom-ci-configuration-path'), target: '_blank' = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/admin/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml index 16b7fbe1ab6..1bf25b6a558 100644 --- a/app/views/admin/application_settings/_diff_limits.html.haml +++ b/app/views/admin/application_settings/_diff_limits.html.haml @@ -9,7 +9,7 @@ Diff files surpassing this limit will be presented as 'too large' and won't be expandable. - = link_to icon('question-circle'), + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/diff_limits', anchor: 'maximum-diff-patch-size') .gl-display-flex.gl-justify-content-end 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 e82ed0db851..179eb2d5f2e 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 @@ -19,7 +19,7 @@ = _('Enable classification control using an external service') %span.form-text.text-muted = external_authorization_description - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/external_authorization') + = 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.text_field :external_authorization_service_url, class: 'form-control' diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml new file mode 100644 index 00000000000..bbad5155ada --- /dev/null +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -0,0 +1,30 @@ +- return unless Gitlab::Gitpod.feature_available? +- expanded = integration_expanded?('gitpod_') +- gitpod_link = link_to("Gitpod#{sprite_icon('external-link', size: 12, css_class: 'ml-1 vertical-align-center')}".html_safe, 'https://gitpod.io/', target: '_blank', rel: 'noopener noreferrer') + +%section.settings.no-animate#js-gitpod-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _('Gitpod') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = s_('Enable %{gitpod_link} integration to launch a development environment in your browser directly from GitLab.').html_safe % { gitpod_link: gitpod_link } + = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') + + + .settings-content + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) + + %fieldset + .form-group + .form-check + = f.check_box :gitpod_enabled, class: 'form-check-input' + = f.label :gitpod_enabled, s_('Gitpod|Enable Gitpod integration'), class: 'form-check-label' + .form-group + = f.label :gitpod_url, s_('Gitpod|Gitpod URL'), class: 'label-bold' + = f.text_field :gitpod_url, class: 'form-control', placeholder: s_('Gitpod|e.g. https://gitpod.example.com') + .form-text.text-muted + = s_('Gitpod|Add the URL to your Gitpod instance configured to read your GitLab projects.') + = f.submit s_('Save changes'), class: 'btn btn-success' diff --git a/app/views/admin/application_settings/_grafana.html.haml b/app/views/admin/application_settings/_grafana.html.haml index 700be7db54f..80ff5a298b4 100644 --- a/app/views/admin/application_settings/_grafana.html.haml +++ b/app/views/admin/application_settings/_grafana.html.haml @@ -4,7 +4,7 @@ %fieldset %p = _("Add a Grafana button in the admin sidebar, monitoring section, to access a variety of statistics on the health and performance of GitLab.") - = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/grafana_configuration.md') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/performance/grafana_configuration.md') .form-group .form-check = f.check_box :grafana_enabled, class: 'form-check-input' diff --git a/app/views/admin/application_settings/_package_registry.html.haml b/app/views/admin/application_settings/_package_registry.html.haml new file mode 100644 index 00000000000..257a90252cc --- /dev/null +++ b/app/views/admin/application_settings/_package_registry.html.haml @@ -0,0 +1,50 @@ +- if Gitlab.config.packages.enabled + %section.settings.as-package.no-animate#js-package-settings{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4 + = _('Package Registry') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _("Settings related to the use and experience of using GitLab's Package Registry.") + + = render_if_exists 'admin/application_settings/ee_package_registry' + + .settings-content + %h4 + = _('Package file size limits') + %p + = _('Set limit to 0 to allow any file size.') + .scrolling-tabs-container.inner-page-scroll-tabs + - if @plans.size > 1 + %ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs.mb-3 + - @plans.each_with_index do |plan, index| + %li + = link_to admin_plan_limits_path(anchor: 'js-package-settings'), data: { target: "div#plan#{index}", action: "plan#{index}", toggle: 'tab'}, class: index == 0 ? 'active': '' do + = plan.name.capitalize + .tab-content + - @plans.each_with_index do |plan, index| + .tab-pane{ :id => "plan#{index}", class: index == 0 ? 'active': '' } + = form_for plan.actual_limits, url: admin_plan_limits_path(anchor: 'js-package-settings'), html: { class: 'fieldset-form' }, method: :post do |f| + = form_errors(plan) + %fieldset + = f.hidden_field(:plan_id, value: plan.id) + .form-group + = f.label :conan_max_file_size, _('Maximum Conan package file size in bytes'), class: 'label-bold' + = f.number_field :conan_max_file_size, class: 'form-control' + .form-group + = f.label :maven_max_file_size, _('Maximum Maven package file size in bytes'), class: 'label-bold' + = f.number_field :maven_max_file_size, class: 'form-control' + .form-group + = f.label :npm_max_file_size, _('Maximum NPM package file size in bytes'), class: 'label-bold' + = f.number_field :npm_max_file_size, class: 'form-control' + .form-group + = f.label :nuget_max_file_size, _('Maximum NuGet package file size in bytes'), class: 'label-bold' + = f.number_field :nuget_max_file_size, class: 'form-control' + .form-group + = f.label :pypi_max_file_size, _('Maximum PyPI package file size in bytes'), class: 'label-bold' + = f.number_field :pypi_max_file_size, class: 'form-control' + .form-group + = f.label :generic_packages_max_file_size, _('Generic package file size in bytes'), class: 'label-bold' + = f.number_field :generic_packages_max_file_size, class: 'form-control' + = f.submit _('Save %{name} size limits').html_safe % { name: plan.name.capitalize }, class: 'btn gl-button btn-success' diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 8214cf8ce9f..2ee7f3edc97 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -14,7 +14,7 @@ = _("Require users to prove ownership of custom domains") .form-text.text-muted = _("Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled") - = link_to icon('question-circle'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership') + = link_to sprite_icon('question-o'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership') - if Gitlab.config.pages.access_control .form-group .form-check @@ -23,7 +23,7 @@ = _("Disable public access to Pages sites") .form-text.text-muted = _("Access to Pages websites are controlled based on the user's membership to a given project. By checking this box, users will be required to be logged in to have access to all Pages websites in your instance.") - = link_to icon('question-circle'), help_page_path('administration/pages/index.md', anchor: 'disabling-public-access-to-all-pages-websites') + = link_to sprite_icon('question-o'), help_page_path('administration/pages/index.md', anchor: 'disabling-public-access-to-all-pages-websites') %h5 = _("Configure Let's Encrypt") %p diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index 6b02521a0f0..3473c185dbe 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -13,7 +13,7 @@ to authenticate SSH keys via the database file. Only uncheck this if you have configured your OpenSSH server to use the AuthorizedKeysCommand. Click on the help icon for more details. - = link_to icon('question-circle'), help_page_path('administration/operations/fast_ssh_key_lookup') + = link_to sprite_icon('question-o'), help_page_path('administration/operations/fast_ssh_key_lookup') .form-group = f.label :raw_blob_request_limit, _('Raw blob request rate limit per minute'), class: 'label-bold' diff --git a/app/views/admin/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml index b2ec25cdf8d..49f58449d29 100644 --- a/app/views/admin/application_settings/_prometheus.html.haml +++ b/app/views/admin/application_settings/_prometheus.html.haml @@ -10,7 +10,7 @@ \. This setting requires a = link_to 'restart', help_page_path('administration/restart_gitlab') to take effect. - = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/index') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/prometheus/index') .form-group .form-check = f.check_box :prometheus_metrics_enabled, class: 'form-check-input' @@ -22,7 +22,7 @@ Environment variable %code prometheus_multiproc_dir does not exist or is not pointing to a valid directory. - = link_to icon('question-circle'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/prometheus/gitlab_metrics', anchor: 'metrics-shared-directory') .form-group = f.label :metrics_method_call_threshold, 'Method Call Threshold (ms)', class: 'label-bold' = f.number_field :metrics_method_call_threshold, class: 'form-control' diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml index 8f6946534ea..0e9731b1c70 100644 --- a/app/views/admin/application_settings/_realtime.html.haml +++ b/app/views/admin/application_settings/_realtime.html.haml @@ -12,7 +12,6 @@ The multiplier can also have a decimal value. The default value (1) is a reasonable choice for the majority of GitLab installations. Set to 0 to completely disable polling. - = link_to icon('question-circle'), help_page_path('administration/polling') + = link_to sprite_icon('question-o'), help_page_path('administration/polling') = f.submit 'Save changes', class: "btn btn-success" - diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index fea3ff4c3ba..7ff2b6e841d 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -10,9 +10,15 @@ = 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 icon('question-circle'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy') + = link_to sprite_icon('question-o'), help_page_path('user/packages/container_registry/index', 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 icon('question-circle'), 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/index', anchor: 'use-with-external-container-registries') + - if limit_delete_tags_service? + .form-group + = f.label :container_registry_delete_tags_service_timeout, _('Cleanup policy maximum processing time (seconds)'), class: 'label-bold' + = f.number_field :container_registry_delete_tags_service_timeout, min: 0, class: 'form-control' + .form-text.text-muted + = _("Tags are deleted until the timeout is reached. Any remaining tags are included the next time the policy runs. To remove the time limit, set it to 0.") = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml index 3b1d1eceb9c..d598f173ff3 100644 --- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml +++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml @@ -10,7 +10,7 @@ = _('Allow repository mirroring to be configured by project maintainers') %span.form-text.text-muted = _('If disabled, only admins will be able to configure repository mirroring.') - = link_to icon('question-circle'), help_page_path('user/project/repository/repository_mirroring.md') + = link_to sprite_icon('question-o'), help_page_path('user/project/repository/repository_mirroring.md') = render_if_exists 'admin/application_settings/mirror_settings', form: f diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index ee55529621b..0dc8dc0740e 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -16,7 +16,7 @@ .form-text %p.text-secondary = _('Enter weights for storages for new repositories.') - = link_to icon('question-circle'), help_page_path('administration/repository_storage_paths') + = link_to sprite_icon('question-o'), help_page_path('administration/repository_storage_paths') .form-check - storage_weights.each do |attribute| = f.text_field attribute[:name], class: 'form-text-input', value: attribute[:value] diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 505be869620..2a26a0909fd 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -38,7 +38,7 @@ = f.check_box :notify_on_unknown_sign_in, class: 'form-check-input' = f.label :notify_on_unknown_sign_in, class: 'form-check-label' do = _('Notify users by email when sign-in location is not recognized') - = link_to icon('question-circle'), + = link_to sprite_icon('question-o'), 'https://docs.gitlab.com/ee/user/profile/unknown_sign_in_notification.html', target: '_blank' .form-group diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 3216d7b7a9a..c339d6df363 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -25,8 +25,5 @@ .form-group = f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light' = f.text_field :snowplow_cookie_domain, class: 'form-control' - .form-group - = f.label :snowplow_iglu_registry_url, _('Iglu registry URL (optional)'), class: 'label-light' - = f.text_field :snowplow_iglu_registry_url, class: 'form-control' = f.submit _('Save changes'), class: 'btn btn-success' diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index d8a4c601b77..4e45db1e10a 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -1,3 +1,5 @@ +- payload_class = 'js-usage-ping-payload' + = form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f| = form_errors(@application_setting) @@ -9,7 +11,7 @@ Enable version check .form-text.text-muted GitLab will inform you if a new version is available. - = link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check-core-only') + = link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check') about what information is shared with GitLab Inc. .form-group - can_be_configured = @application_setting.usage_ping_can_be_configured? @@ -21,21 +23,18 @@ - if can_be_configured %p.mb-2= _('To help improve GitLab and its user experience, GitLab will periodically collect usage information.') - - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping-core-only') + - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping') - usage_ping_link_start = ''.html_safe % { url: usage_ping_path } %p.mb-2= s_('%{usage_ping_link_start}Learn more%{usage_ping_link_end} about what information is shared with GitLab Inc.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: ''.html_safe } - %button.btn.js-usage-ping-payload-trigger{ type: 'button' } + %button.btn.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } } .spinner.js-spinner.d-none .js-text.d-inline= _('Preview payload') - %pre.usage-data.js-usage-ping-payload.js-syntax-highlight.code.highlight.mt-2.d-none{ data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } + %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/telemetry/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 } - .form-group.mt-3 - = f.label :instance_statistics_visibility_private, _('Instance Statistics visibility') - = f.select :instance_statistics_visibility_private, options_for_select({_('All users') => false, _('Only admins') => true}, Gitlab::CurrentSettings.instance_statistics_visibility_private?), {}, class: 'form-control' = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml index aa1a6256986..6ff35a42efd 100644 --- a/app/views/admin/application_settings/ci/_header.html.haml +++ b/app/views/admin/application_settings/ci/_header.html.haml @@ -2,7 +2,7 @@ %h4 = _('Variables') - = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'custom-environment-variables'), target: '_blank', rel: 'noopener noreferrer' + = link_to sprite_icon('question-o', css_class: 'gl-vertical-align-baseline!'), help_page_path('ci/variables/README', anchor: 'custom-environment-variables'), target: '_blank', rel: 'noopener noreferrer' %button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 788dc0b0f1b..823cee09d4b 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -117,6 +117,7 @@ #js-maintenance-mode-settings = render_if_exists 'admin/application_settings/elasticsearch_form' += render 'admin/application_settings/gitpod' = render 'admin/application_settings/plantuml' = render 'admin/application_settings/sourcegraph' = render_if_exists 'admin/application_settings/slack' diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index b5dae424b46..ed4f63d0b82 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -16,5 +16,5 @@ %h4= s_('AdminSettings|Apply integration settings to all Projects') %p = s_('AdminSettings|Integrations configured here will automatically apply to all projects on this instance.') - = link_to _('Learn more'), '#' + = link_to _('Learn more'), integrations_help_page_path, target: '_blank', rel: 'noopener noreferrer' = render 'shared/integrations/index', integrations: @integrations diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml index 181c54c2716..9f1b7195ab7 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -32,7 +32,7 @@ = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Enable access to the Performance Bar for a given group.') - = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/performance_bar') + = link_to sprite_icon('question-o'), help_page_path('administration/monitoring/performance/performance_bar') .settings-content = render 'performance_bar' diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index 8338401bea5..0d01f1c57e0 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -16,11 +16,6 @@ = doorkeeper_errors_for application, :redirect_uri %span.form-text.text-muted Use one line per URI - - if Doorkeeper.configuration.native_redirect_uri - %span.form-text.text-muted - Use - %code= Doorkeeper.configuration.native_redirect_uri - for local tests = content_tag :div, class: 'form-group row' do .col-sm-2.col-form-label.pt-0 diff --git a/app/views/admin/cohorts/_cohorts_table.html.haml b/app/views/admin/cohorts/_cohorts_table.html.haml new file mode 100644 index 00000000000..bb6266b38f6 --- /dev/null +++ b/app/views/admin/cohorts/_cohorts_table.html.haml @@ -0,0 +1,35 @@ +- number_of_data_columns = @cohorts[:months_included] - 1 +.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/analytics/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' + +.table-holder.d-xl-table + %table.table + %thead + %tr + %th.border-right.pt-4{ colspan: 3 } + %th.font-weight-bold.pt-4{ colspan: number_of_data_columns } + = s_("Cohorts|Returning users") + %tr + %th.border-top-0 + = s_("Cohorts|Registration month") + %th.border-top-0 + = s_("Cohorts|Inactive users") + %th.border-top-0.border-right + = s_("Cohorts|New users") + - number_of_data_columns.times do |i| + %th.border-top-0 + = s_("Cohorts|Month %{month_index}") % { month_index: i + 1 } + %tbody + - @cohorts[:cohorts].each do |cohort| + %tr + %td= cohort[:registration_month] + %td= cohort[:inactive] + %td.border-right= cohort[:total] + - cohort[:activity_months].each do |activity_month| + %td + - next if cohort[:total] == '0' + = activity_month[:percentage] + %br + = activity_month[:total] diff --git a/app/views/admin/cohorts/index.html.haml b/app/views/admin/cohorts/index.html.haml new file mode 100644 index 00000000000..03cd392d370 --- /dev/null +++ b/app/views/admin/cohorts/index.html.haml @@ -0,0 +1,7 @@ +- breadcrumb_title _("Cohorts") +- page_title _("Cohorts") + +- if @cohorts + = render 'cohorts_table' +- else + #js-cohorts-empty-state{ data: { 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('user/admin_area/analytics/user_cohorts') } } diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 271ab12037e..4acfc96caf2 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -7,47 +7,44 @@ dismissible: true.to_s } } = notice[:message].html_safe -- if show_license_breakdown? - = render_if_exists 'admin/licenses/breakdown', license: @license +- if @license.present? && show_license_breakdown? + = render_if_exists 'admin/licenses/breakdown' .admin-dashboard.gl-mt-3 .row .col-sm-4 - .info-well.dark-well + .info-well.dark-well.flex-fill .well-segment.well-centered = link_to admin_projects_path do %h3.text-center - Projects: - = approximate_count_with_delimiters(@counts, Project) + = s_('AdminArea|Projects: %{number_of_projects}') % { number_of_projects: approximate_count_with_delimiters(@counts, Project) } %hr - = link_to('New project', new_project_path, class: "btn btn-success") + = link_to(s_('AdminArea|New project'), new_project_path, class: "btn btn-success gl-w-full") .col-sm-4 .info-well.dark-well .well-segment.well-centered = link_to admin_users_path do %h3.text-center - Users: - = approximate_count_with_delimiters(@counts, User) + = s_('AdminArea|Users: %{number_of_users}') % { number_of_users: approximate_count_with_delimiters(@counts, User) } %hr .btn-group.d-flex{ role: 'group' } - = link_to 'New user', new_admin_user_path, class: "btn btn-success" - = link_to s_('AdminArea|Users statistics'), admin_dashboard_stats_path, class: 'btn btn-primary' + = link_to s_('AdminArea|New user'), new_admin_user_path, class: "btn btn-success gl-w-full" + = link_to s_('AdminArea|Users statistics'), admin_dashboard_stats_path, class: 'btn btn-primary gl-w-full' .col-sm-4 .info-well.dark-well .well-segment.well-centered = link_to admin_groups_path do %h3.text-center - Groups: - = approximate_count_with_delimiters(@counts, Group) + = s_('AdminArea|Groups: %{number_of_groups}') % { number_of_groups: approximate_count_with_delimiters(@counts, Group) } %hr - = link_to 'New group', new_admin_group_path, class: "btn btn-success" + = link_to s_('AdminArea|New group'), new_admin_group_path, class: "btn btn-success gl-w-full" .row .col-md-4 #js-admin-statistics-container .col-md-4 .info-well .well-segment.admin-well.admin-well-features - %h4 Features + %h4= s_('AdminArea|Features') = feature_entry(_('Sign up'), href: general_admin_application_settings_path(anchor: 'js-signup-settings'), enabled: allow_signup?) @@ -87,42 +84,41 @@ .info-well .well-segment.admin-well %h4 - Components + = s_('AdminArea|Components') - if Gitlab::CurrentSettings.version_check_enabled .float-right = version_status_badge %p - %a{ href: general_admin_application_settings_path } - GitLab + = link_to _('GitLab'), general_admin_application_settings_path %span.float-right = Gitlab::VERSION = "(#{Gitlab.revision})" %p - GitLab Shell + = _('GitLab Shell') %span.float-right = Gitlab::Shell.version %p - GitLab Workhorse + = _('GitLab Workhorse') %span.float-right = gitlab_workhorse_version %p - GitLab API + = _('GitLab API') %span.float-right = API::API::version - if Gitlab.config.pages.enabled %p - GitLab Pages + = _('GitLab Pages') %span.float-right = Gitlab::Pages::VERSION = render_if_exists 'admin/dashboard/geo' %p - Ruby + = _('Ruby') %span.float-right #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} %p - Rails + = _('Rails') %span.float-right #{Rails::VERSION::STRING} %p @@ -130,12 +126,12 @@ %span.float-right = Gitlab::Database.version %p - = link_to "Gitaly Servers", admin_gitaly_servers_path + = link_to _("Gitaly Servers"), admin_gitaly_servers_path .row .col-md-4 .info-well .well-segment.admin-well - %h4 Latest projects + %h4= s_('AdminArea|Latest projects') - @projects.each do |project| %p = link_to project.full_name, admin_project_path(project), class: 'str-truncated-60' @@ -144,7 +140,7 @@ .col-md-4 .info-well .well-segment.admin-well - %h4 Latest users + %h4= s_('AdminArea|Latest users') - @users.each do |user| %p = link_to [:admin, user], class: 'str-truncated-60' do @@ -154,7 +150,7 @@ .col-md-4 .info-well .well-segment.admin-well - %h4 Latest groups + %h4= s_('AdminArea|Latest groups') - @groups.each do |group| %p = link_to [:admin, group], class: 'str-truncated-60' do diff --git a/app/views/admin/dev_ops_report/_callout.html.haml b/app/views/admin/dev_ops_report/_callout.html.haml new file mode 100644 index 00000000000..7507f433af8 --- /dev/null +++ b/app/views/admin/dev_ops_report/_callout.html.haml @@ -0,0 +1,13 @@ +.gl-mt-3 +.user-callout{ data: { uid: 'dev_ops_report_intro_callout_dismissed' } } + .bordered-box.landing.content-block + %button.btn.btn-default.close.js-close-callout{ type: 'button', + 'aria-label' => _('Dismiss DevOps Report introduction') } + = sprite_icon('close', size: 16, css_class: 'dismiss-icon') + .user-callout-copy + %h4 + = _('Introducing Your DevOps Report') + %p + = _('Your DevOps Report gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers.') + .svg-container.devops + = custom_icon('dev_ops_report_overview') diff --git a/app/views/admin/dev_ops_report/_card.html.haml b/app/views/admin/dev_ops_report/_card.html.haml new file mode 100644 index 00000000000..dd6e5c0f108 --- /dev/null +++ b/app/views/admin/dev_ops_report/_card.html.haml @@ -0,0 +1,25 @@ +.devops-card-wrapper + .devops-card{ class: "devops-card-#{score_level(card.percentage_score)}" } + .devops-card-title + %h3 + = card.title + .light-text + = card.description + .board-card-scores + .board-card-score + .board-card-score-value + = format_score(card.instance_score) + .board-card-score-name= _('You') + .board-card-score + .board-card-score-value + = format_score(card.leader_score) + .board-card-score-name= _('Lead') + .board-card-score-big + = number_to_percentage(card.percentage_score, precision: 1) + .board-card-buttons + - if card.blog + %a.btn-svg{ href: card.blog } + = sprite_icon('information-o') + - if card.docs + %a.btn-svg{ href: card.docs } + = sprite_icon('question-o') diff --git a/app/views/admin/dev_ops_report/_no_data.html.haml b/app/views/admin/dev_ops_report/_no_data.html.haml new file mode 100644 index 00000000000..e540a4e2bce --- /dev/null +++ b/app/views/admin/dev_ops_report/_no_data.html.haml @@ -0,0 +1,7 @@ +.container.devops-empty + .col-sm-12.justify-content-center.text-center + = custom_icon('dev_ops_report_no_data') + %h4= _('Data is still calculating...') + %p + = _('It may be several days before you see feature usage data.') + = link_to _('Our documentation includes an example DevOps Score report.'), help_page_path('user/admin_area/analytics/dev_ops_report'), target: '_blank' diff --git a/app/views/admin/dev_ops_report/show.html.haml b/app/views/admin/dev_ops_report/show.html.haml new file mode 100644 index 00000000000..1892557d0d6 --- /dev/null +++ b/app/views/admin/dev_ops_report/show.html.haml @@ -0,0 +1,33 @@ +- page_title _('DevOps Report') +- usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled + +.container + - if usage_ping_enabled && show_callout?('dev_ops_report_intro_callout_dismissed') + = render 'callout' + + .gl-mt-3 + - 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/telemetry/usage_ping') } } + - elsif @metric.blank? + = render 'no_data' + - else + .devops + .devops-header + %h2.devops-header-title{ class: "devops-#{score_level(@metric.average_percentage_score)}-score" } + = number_to_percentage(@metric.average_percentage_score, precision: 1) + .devops-header-subtitle + = _('DevOps') + %br + = _('Score') + = link_to sprite_icon('question-o', css_class: 'devops-header-icon'), help_page_path('user/admin_area/analytics/dev_ops_report') + + .devops-cards.board-card-container + - @metric.cards.each do |card| + = render 'card', card: card + + .devops-steps.d-none.d-lg-block.d-xl-block + - @metric.idea_to_production_steps.each_with_index do |step, index| + .devops-step{ class: "devops-#{score_level(step.percentage_score)}-score" } + = custom_icon("i2p_step_#{index + 1}") + %h4.devops-step-title + = step.title diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 22cf722d117..041b0661d37 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -24,8 +24,10 @@ - if @group.new_record? .form-group.row .offset-sm-2.col-sm-10 - .alert.alert-info - = render 'shared/group_tips' + .gl-alert.gl-alert-info + = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + = render 'shared/group_tips' .form-actions = f.submit _('Create group'), class: "btn btn-success" = link_to _('Cancel'), admin_groups_path, class: "btn btn-cancel" diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index ab817b2ef6e..3a82f3803bd 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -27,7 +27,7 @@ %span.gl-ml-5 = sprite_icon('users', css_class: 'gl-vertical-align-text-bottom') - = number_with_delimiter(group.users.count) + = number_with_delimiter(group.users_count) %span.gl-ml-5.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group) } = visibility_level_icon(group.visibility_level) diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 6dd73698848..6c2c0b3a488 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -57,7 +57,7 @@ %span.light= _('Group Git LFS status:') %strong = group_lfs_status(@group) - = link_to icon('question-circle'), help_page_path('topics/git/lfs/index') + = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index') = render_if_exists 'namespaces/shared_runner_status', namespace: @group diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index fbe37f6c509..65d3c78ec11 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -27,7 +27,7 @@ .card-header Current Status: - if no_errors - = icon('circle', class: 'cgreen') + = sprite_icon('check', css_class: 'cgreen') #{ s_('HealthCheck|Healthy') } - else = icon('warning', class: 'cred') diff --git a/app/views/admin/instance_statistics/index.html.haml b/app/views/admin/instance_statistics/index.html.haml new file mode 100644 index 00000000000..ab28a2471e6 --- /dev/null +++ b/app/views/admin/instance_statistics/index.html.haml @@ -0,0 +1,4 @@ +- breadcrumb_title _("Instance Statistics") +- page_title _("Instance Statistics") + +#js-instance-statistics-app diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index f842ab2d009..44317eb7f6e 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -5,10 +5,7 @@ %li.project-row{ class: ('no-description' if project.description.blank?) } .controls = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn" - %button.delete-project-button.btn.btn-danger{ data: { toggle: 'modal', - target: '#delete-project-modal', - delete_project_url: admin_project_path(project), - project_name: project.name }, type: 'button' } + %button.delete-project-button.btn.btn-danger{ data: { delete_project_url: admin_project_path(project), project_name: project.name } } = s_('AdminProjects|Delete') .stats diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index bd3b2f40059..d5af12fcd09 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -100,7 +100,7 @@ = _('Git LFS status:') %strong = project_lfs_status(@project) - = link_to icon('question-circle'), help_page_path('topics/git/lfs/index') + = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index') - else %li %span.light @@ -165,7 +165,7 @@ - else = _("This repository was last checked %{last_check_timestamp}. The check passed.") % { last_check_timestamp: @project.last_repository_check_at.to_s(:medium) } - = link_to icon('question-circle'), help_page_path('administration/repository_checks') + = link_to sprite_icon('question-o'), help_page_path('administration/repository_checks') .form-group = f.submit _('Trigger repository check'), class: 'btn btn-primary' diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml index 0bbe73d6f7e..a2b736c332c 100644 --- a/app/views/admin/runners/_runner.html.haml +++ b/app/views/admin/runners/_runner.html.haml @@ -76,4 +76,4 @@ = sprite_icon('play') .btn-group = link_to [:admin, runner], method: :delete, class: 'btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do - = icon('remove') + = sprite_icon('close') diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 08d65819476..cc218aefdb7 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -108,7 +108,7 @@ {{name}} = button_tag class: %w[clear-search hidden] do - = icon('times') + = sprite_icon('close', size: 16, css_class: 'clear-search-icon') .filter-dropdown-container = render 'sort_dropdown' diff --git a/app/views/admin/runners/update.js.haml b/app/views/admin/runners/update.js.haml deleted file mode 100644 index 2b7d3067e20..00000000000 --- a/app/views/admin/runners/update.js.haml +++ /dev/null @@ -1,2 +0,0 @@ -:plain - $("#runner_#{@runner.id}").replaceWith("#{escape_javascript(render(@runner))}") diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index f2153e503af..c17ab5e08a7 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -3,8 +3,5 @@ %p #{@service.description} template. -= form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'fieldset-form' } do |form| += form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'fieldset-form js-integration-settings-form' } do |form| = render 'shared/service_settings', form: form, integration: @service - - .footer-block.row-content-block - = form.submit 'Save', class: 'btn btn-success' diff --git a/app/views/admin/services/index.html.haml b/app/views/admin/services/index.html.haml index 19a0b7466a2..3517beac976 100644 --- a/app/views/admin/services/index.html.haml +++ b/app/views/admin/services/index.html.haml @@ -1,9 +1,28 @@ - page_title _("Service Templates") +- @content_class = 'limit-container-width' unless fluid_layout + +- if show_service_templates_deprecated? + .gl-alert.gl-alert-tip.js-service-templates-deprecated.gl-mt-5{ role: 'alert', data: { feature_id: UserCalloutsHelper::SERVICE_TEMPLATES_DEPRECATED, dismiss_endpoint: user_callouts_path } } + = sprite_icon('bulb', css_class: 'gl-alert-icon gl-alert-icon-no-title') + %button.js-close.gl-alert-dismiss{ type: 'button', aria: { label: _('Dismiss') } } + = sprite_icon('close') + %h4.gl-alert-title= s_('AdminSettings|Service Templates will soon be deprecated.') + .gl-alert-body + = s_('AdminSettings|Try using the latest version of Integrations instead.') + .gl-alert-actions + = link_to _('Go to Integrations'), integrations_admin_application_settings_path, class: 'btn btn-info gl-alert-action gl-button' + = link_to _('Learn more'), help_page_path('user/admin_area/settings/project_integration_management'), class: 'btn btn-default gl-alert-action btn-secondary gl-button', target: '_blank', rel: 'noopener noreferrer' + %h3.page-title Service templates %p.light= s_('AdminSettings|Service template allows you to set default values for integrations') .table-holder %table.table + %colgroup + %col + %col + %col + %col{ width: 135 } %thead %tr %th diff --git a/app/views/admin/sessions/_two_factor_otp.html.haml b/app/views/admin/sessions/_two_factor_otp.html.haml index 9d4acbf1b99..8d5588de06e 100644 --- a/app/views/admin/sessions/_two_factor_otp.html.haml +++ b/app/views/admin/sessions/_two_factor_otp.html.haml @@ -1,4 +1,4 @@ -= form_tag(admin_session_path, { method: :post, class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if current_user.two_factor_u2f_enabled?}" }) do += form_tag(admin_session_path, { method: :post, class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if current_user.two_factor_webauthn_u2f_enabled?}" }) do .form-group = label_tag :user_otp_attempt, _('Two-Factor Authentication code') = text_field_tag 'user[otp_attempt]', nil, class: 'form-control', required: true, autofocus: true, autocomplete: 'off', title: _('This field is required.') diff --git a/app/views/admin/sessions/two_factor.html.haml b/app/views/admin/sessions/two_factor.html.haml index 746d57dbad1..531ab206157 100644 --- a/app/views/admin/sessions/two_factor.html.haml +++ b/app/views/admin/sessions/two_factor.html.haml @@ -11,5 +11,5 @@ .login-body - if current_user.two_factor_otp_enabled? = render 'admin/sessions/two_factor_otp' - - if current_user.two_factor_u2f_enabled? - = render 'u2f/authenticate', render_remember_me: false, target_path: admin_session_path + - if current_user.two_factor_webauthn_u2f_enabled? + = render 'authentication/authenticate', render_remember_me: false, target_path: admin_session_path diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 38c6c8b2a62..9e31c8d2852 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -87,8 +87,8 @@ .form-actions - if @user.new_record? - = f.submit 'Create user', class: "btn btn-success" + = f.submit 'Create user', class: "btn gl-button btn-success" = link_to 'Cancel', admin_users_path, class: "btn btn-cancel" - else - = f.submit 'Save changes', class: "btn btn-success" - = link_to 'Cancel', admin_user_path(@user), class: "btn btn-cancel" + = f.submit 'Save changes', class: "btn gl-button btn-success" + = link_to 'Cancel', admin_user_path(@user), class: "btn gl-button btn-cancel" diff --git a/app/views/admin/users/_modals.html.haml b/app/views/admin/users/_modals.html.haml index eaec6d69f5a..6cf6dc116e3 100644 --- a/app/views/admin/users/_modals.html.haml +++ b/app/views/admin/users/_modals.html.haml @@ -16,7 +16,7 @@ 'secondary-action': s_('AdminUsers|Block user') } } = s_('AdminUsers|You are about to permanently delete the user %{username}. Issues, merge requests, and groups linked to them will be transferred to a system-wide "Ghost-user". To avoid data loss, - consider using the %{strong_start}block user%{strong_end} feature instead. Once you %{strong_start}Delete user%{strong_end}, + consider using the %{strongStart}block user%{strongEnd} feature instead. Once you %{strongStart}Delete user%{strongEnd}, it cannot be undone or recovered.') %div{ data: { modal: "delete-with-contributions", diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 440eaac1917..160303890f5 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -17,9 +17,9 @@ - unless user.internal? .table-section.section-20.table-button-footer .table-action-buttons - = link_to _('Edit'), edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn btn-default' + = link_to _('Edit'), edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn gl-button btn-default' - unless user == current_user - %button.dropdown-new.btn.btn-default{ type: 'button', data: { toggle: 'dropdown' } } + %button.dropdown-new.btn.gl-button.btn-default{ type: 'button', data: { toggle: 'dropdown' } } = sprite_icon('settings') = sprite_icon('chevron-down') %ul.dropdown-menu.dropdown-menu-right @@ -32,13 +32,13 @@ - elsif user.blocked? = link_to _('Unblock'), unblock_admin_user_path(user), method: :put - else - %button.btn{ data: { 'gl-modal-action': 'block', + %button.btn.gl-button.btn-default-tertiary{ data: { 'gl-modal-action': 'block', url: block_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Block') - if user.can_be_deactivated? %li - %button.btn{ data: { 'gl-modal-action': 'deactivate', + %button.btn.gl-button.btn-default-tertiary{ data: { 'gl-modal-action': 'deactivate', url: deactivate_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Deactivate') @@ -52,13 +52,13 @@ %li.divider - if user.can_be_removed? %li - %button.delete-user-button.btn.text-danger{ data: { 'gl-modal-action': 'delete', + %button.delete-user-button.btn.gl-button.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete', delete_user_url: admin_user_path(user), block_user_url: block_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Delete user') %li - %button.delete-user-button.btn.text-danger{ data: { 'gl-modal-action': 'delete-with-contributions', + %button.delete-user-button.btn.gl-button.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete-with-contributions', delete_user_url: admin_user_path(user, hard_delete: true), block_user_url: block_admin_user_path(user), username: sanitize_name(user.name) } } diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 05988c17412..118bdf7bb17 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -40,7 +40,7 @@ %small.badge.badge-pill= limited_counter_with_delimiter(User.without_projects) .nav-controls = render_if_exists 'admin/users/admin_email_users' - = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn btn-success btn-search float-right' + = 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 = form_tag admin_users_path, method: :get do diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index e5e6790b789..08aa7c3c9d2 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,5 +1,5 @@ - page_title _("New User") %h3.page-title - New user + = s_('AdminUsers|New user') %hr = render 'form' diff --git a/app/views/admin/users/projects.html.haml b/app/views/admin/users/projects.html.haml index f66d9b76afc..70a497f14ff 100644 --- a/app/views/admin/users/projects.html.haml +++ b/app/views/admin/users/projects.html.haml @@ -16,8 +16,8 @@ .float-right %span.light.vertical-align-middle= group_member.human_access - unless group_member.owner? - = link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member) }, method: :delete, remote: true, class: "btn-sm btn btn-remove gl-ml-3", title: 'Remove user from group' do - %i.fa.fa-times.fa-inverse + = link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member), testid: 'remove-user' }, method: :delete, remote: true, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from group') do + = sprite_icon('close', size: 16, css_class: 'gl-icon') .row .col-md-6 @@ -46,5 +46,5 @@ %span.light.vertical-align-middle= member.human_access - if member.respond_to? :project - = link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn-sm btn btn-remove gl-ml-3", title: 'Remove user from project' do - %i.fa.fa-times + = link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: 'Remove user from project' do + = sprite_icon('close', size: 16, css_class: 'gl-icon') diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 2bc39a23b2d..a08c29714e0 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -38,19 +38,23 @@ %span.light Secondary email: %strong = render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? } - = link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn-sm btn btn-remove float-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do - %i.fa.fa-times + = link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon float-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do + = sprite_icon('close', size: 16, css_class: 'gl-icon') %li %span.light ID: %strong = @user.id + %li + %span.light= _('Namespace ID:') + %strong + = @user.namespace_id %li.two-factor-status %span.light Two-factor Authentication: %strong{ class: @user.two_factor_enabled? ? 'cgreen' : 'cred' } - if @user.two_factor_enabled? Enabled - = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn btn-sm btn-remove float-right', title: 'Disable Two-factor Authentication' + = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-remove float-right', title: 'Disable Two-factor Authentication' - else Disabled @@ -142,7 +146,7 @@ - email = " (#{@user.unconfirmed_email})" %p This user has an unconfirmed email address#{email}. You may force a confirmation. %br - = link_to 'Confirm user', confirm_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?', qa_selector: 'confirm_user_button' } + = link_to 'Confirm user', confirm_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?', qa_selector: 'confirm_user_button' } = render 'admin/users/user_detail_note' @@ -153,7 +157,7 @@ .card-body = render partial: 'admin/users/user_activation_effects' %br - = link_to 'Activate user', activate_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' } + = link_to 'Activate user', activate_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - elsif @user.can_be_deactivated? .card.border-warning .card-header.bg-warning.text-white @@ -161,7 +165,7 @@ .card-body = render partial: 'admin/users/user_deactivation_effects' %br - %button.btn.btn-warning{ data: { 'gl-modal-action': 'deactivate', + %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'deactivate', content: 'You can always re-activate their account, their data will remain intact.', url: deactivate_admin_user_path(@user), username: sanitize_name(@user.name) } } @@ -177,7 +181,7 @@ %li Log in %li Access Git repositories %br - = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' } + = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - else .card.border-warning .card-header.bg-warning.text-white @@ -185,7 +189,7 @@ .card-body = render partial: 'admin/users/user_block_effects' %br - %button.btn.btn-warning{ data: { 'gl-modal-action': 'block', + %button.btn.gl-button.btn-warning{ data: { 'gl-modal-action': 'block', content: 'You can always unblock their account, their data will remain intact.', url: block_admin_user_path(@user), username: sanitize_name(@user.name) } } @@ -197,7 +201,7 @@ .card-body %p This user has been temporarily locked due to excessive number of failed logins. You may manually unlock the account. %br - = link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' } + = link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } .card.border-danger .card-header.bg-danger.text-white @@ -207,7 +211,7 @@ %p Deleting a user has the following effects: = render 'users/deletion_guidance', user: @user %br - %button.delete-user-button.btn.btn-danger{ data: { 'gl-modal-action': 'delete', + %button.delete-user-button.btn.gl-button.btn-danger{ data: { 'gl-modal-action': 'delete', delete_user_url: admin_user_path(@user), block_user_url: block_admin_user_path(@user), username: sanitize_name(@user.name) } } @@ -237,7 +241,7 @@ the user, and projects in them, will also be removed. Commits to other projects are unaffected. %br - %button.delete-user-button.btn.btn-danger{ data: { 'gl-modal-action': 'delete-with-contributions', + %button.delete-user-button.btn.gl-button.btn-danger{ data: { 'gl-modal-action': 'delete-with-contributions', delete_user_url: admin_user_path(@user, hard_delete: true), block_user_url: block_admin_user_path(@user), username: @user.name } } -- cgit v1.2.3