diff options
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/application_settings/_account_and_limit.html.haml | 1 | ||||
-rw-r--r-- | app/views/admin/application_settings/_package_registry.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/application_settings/_snowplow.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/application_settings/network.html.haml | 21 | ||||
-rw-r--r-- | app/views/admin/dashboard/_security_newsletter_callout.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/groups/show.html.haml | 14 | ||||
-rw-r--r-- | app/views/admin/hooks/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/labels/index.html.haml | 24 | ||||
-rw-r--r-- | app/views/admin/projects/_archived.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/projects/_projects.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/projects/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/users/_access_levels.html.haml | 5 | ||||
-rw-r--r-- | app/views/admin/users/_user_detail.html.haml | 20 | ||||
-rw-r--r-- | app/views/admin/users/projects.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/users/show.html.haml | 2 |
16 files changed, 55 insertions, 61 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 19c38d7be62..65882491575 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -32,6 +32,7 @@ = render_if_exists 'admin/application_settings/git_two_factor_session_expiry', form: f = render_if_exists 'admin/application_settings/personal_access_token_expiration_policy', form: f = render_if_exists 'admin/application_settings/enforce_pat_expiration', form: f + = render_if_exists 'admin/application_settings/ssh_key_expiration_policy', form: f = render_if_exists 'admin/application_settings/enforce_ssh_key_expiration', form: f .form-group diff --git a/app/views/admin/application_settings/_package_registry.html.haml b/app/views/admin/application_settings/_package_registry.html.haml index 7cdadaaf37b..398e63cdfdc 100644 --- a/app/views/admin/application_settings/_package_registry.html.haml +++ b/app/views/admin/application_settings/_package_registry.html.haml @@ -33,6 +33,9 @@ = 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 gl-form-input' .form-group + = f.label :helm_max_file_size, _('Maximum Helm chart file size in bytes'), class: 'label-bold' + = f.number_field :helm_max_file_size, class: 'form-control gl-form-input' + .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 gl-form-input' .form-group diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 756c0e770a6..f7a6a26c645 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -1,5 +1,5 @@ - expanded = integration_expanded?('snowplow_') -%section.settings.as-snowplow.no-animate#js-snowplow-settings{ class: ('expanded' if expanded) } +%section.settings.as-snowplow.no-animate#js-snowplow-settings{ class: ('expanded' if expanded), data: { qa_selector: 'snowplow_settings_content' } } .settings-header %h4 = _('Snowplow') @@ -15,7 +15,7 @@ %fieldset .form-group .form-check - = f.check_box :snowplow_enabled, class: 'form-check-input' + = f.check_box :snowplow_enabled, class: 'form-check-input', data: { qa_selector: 'snowplow_enabled_checkbox' } = f.label :snowplow_enabled, _('Enable Snowplow tracking'), class: 'form-check-label' .form-group = f.label :snowplow_collector_hostname, _('Collector hostname'), class: 'label-light' @@ -33,4 +33,4 @@ .form-text.text-muted = _('The Snowplow cookie domain.') - = f.submit _('Save changes'), class: 'gl-button btn btn-confirm' + = f.submit _('Save changes'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index 3a053205725..61a2f97764f 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -37,17 +37,16 @@ .settings-content = render partial: 'network_rate_limits', locals: { anchor: 'js-packages-limits-settings', setting_fragment: 'packages_api' } -- if Feature.enabled?(:files_api_throttling, default_enabled: :yaml) - %section.settings.as-files-limits.no-animate#js-files-limits-settings{ class: ('expanded' if expanded_by_default?) } - .settings-header - %h4 - = _('Files API Rate Limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } - = expanded_by_default? ? _('Collapse') : _('Expand') - %p - = _('Configure specific limits for Files API requests that supersede the general user and IP rate limits.') - .settings-content - = render partial: 'network_rate_limits', locals: { anchor: 'js-files-limits-settings', setting_fragment: 'files_api' } +%section.settings.as-files-limits.no-animate#js-files-limits-settings{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4 + = _('Files API Rate Limits') + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _('Configure specific limits for Files API requests that supersede the general user and IP rate limits.') + .settings-content + = render partial: 'network_rate_limits', locals: { anchor: 'js-files-limits-settings', setting_fragment: 'files_api' } %section.settings.as-deprecated-limits.no-animate#js-deprecated-limits-settings{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/dashboard/_security_newsletter_callout.html.haml b/app/views/admin/dashboard/_security_newsletter_callout.html.haml index ece0f7ca4d9..3aba91e8765 100644 --- a/app/views/admin/dashboard/_security_newsletter_callout.html.haml +++ b/app/views/admin/dashboard/_security_newsletter_callout.html.haml @@ -5,7 +5,7 @@ variant: :tip, alert_class: 'js-security-newsletter-callout', is_contained: true, - alert_data: { feature_id: UserCalloutsHelper::SECURITY_NEWSLETTER_CALLOUT, dismiss_endpoint: user_callouts_path, defer_links: 'true' }, + alert_data: { feature_id: Users::CalloutsHelper::SECURITY_NEWSLETTER_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' }, close_button_data: { testid: 'close-security-newsletter-callout' } do .gl-alert-body = s_('AdminArea|Sign up for the GitLab Security Newsletter to get notified for security updates.') diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 4197d5b961f..801b903395a 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -3,6 +3,8 @@ - billable_users_url = help_page_path('subscriptions/self_managed/index', anchor: 'billable-users') - billable_users_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer nofollow">'.html_safe % { url: billable_users_url } += render_if_exists 'shared/manual_renewal_banner' += render_if_exists 'shared/manual_quarterly_reconciliation_banner' = render_if_exists 'shared/qrtly_reconciliation_alert' = render 'admin/dashboard/security_newsletter_callout' diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index ae809f01592..09f2d431197 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -70,15 +70,13 @@ .card .card-header = _('Projects') - %span.badge.badge-pill - #{@group.projects.count} + = gl_badge_tag @group.projects.count %ul.content-list - @projects.each do |project| %li %strong = link_to project.full_name, [:admin, project] - %span.badge.badge-pill - = storage_counter(project.statistics.storage_size) + = gl_badge_tag storage_counter(project.statistics.storage_size) %span.float-right.light %span.monospace= project.full_path + '.git' - unless @projects.size < Kaminari.config.default_per_page @@ -90,15 +88,13 @@ .card .card-header = _('Projects shared with %{group_name}') % { group_name: @group.name } - %span.badge.badge-pill - #{shared_projects.size} + = gl_badge_tag shared_projects.size %ul.content-list - shared_projects.each do |project| %li %strong = link_to project.full_name, [:admin, project] - %span.badge.badge-pill - = storage_counter(project.statistics.storage_size) + = gl_badge_tag storage_counter(project.statistics.storage_size) %span.float-right.light %span.monospace= project.full_path + '.git' @@ -126,7 +122,7 @@ .card .card-header = html_escape(_("%{group_name} group members")) % { group_name: "<strong>#{html_escape(@group.name)}</strong>".html_safe } - %span.badge.badge-pill= @group.users_count + = gl_badge_tag @group.users_count = render 'shared/members/manage_access_button', path: group_group_members_path(@group) %ul.content-list.group-users-list.content-list.members-list = render partial: 'shared/members/member', diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml index 93038e63a2e..9c258e10008 100644 --- a/app/views/admin/hooks/edit.html.haml +++ b/app/views/admin/hooks/edit.html.haml @@ -1,6 +1,8 @@ - add_to_breadcrumbs @hook.pluralized_name, admin_hooks_path - page_title _('Edit System Hook') += render 'shared/web_hooks/hook_errors', hook: @hook + .row.gl-mt-3 .col-lg-3 = render 'shared/web_hooks/title_and_docs', hook: @hook diff --git a/app/views/admin/labels/index.html.haml b/app/views/admin/labels/index.html.haml index 6007d891aad..66fd18e1b76 100644 --- a/app/views/admin/labels/index.html.haml +++ b/app/views/admin/labels/index.html.haml @@ -6,13 +6,27 @@ %h3.page-title = _('Labels') %hr - -.labels.labels-container.admin-labels.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100 - - if @labels.present? +- if @labels.present? + .labels.labels-container.admin-labels.js-admin-labels-container.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100 %ul.manage-labels-list = render @labels = paginate @labels, theme: 'gitlab' - .nothing-here-block{ class: ('hidden' if @labels.present?) } - = _('There are no labels yet') +.js-admin-labels-empty-state{ class: ('gl-display-none' if @labels.present?) } + %section.row.empty-state.gl-text-center + .col-12 + .svg-content + = image_tag 'illustrations/labels.svg' + .col-12 + .gl-mx-auto.gl-my-0.gl-p-5 + %h1.gl-font-size-h-display.gl-line-height-36.h4 + = s_('AdminLabels|Define your default set of project labels') + %p.gl-mb-0 + = s_('AdminLabels|Labels created here will be automatically added to new projects.') + %p + = s_('AdminLabels|They can be used to categorize issues and merge requests.') + .gl-display-flex.gl-flex-wrap.gl-justify-content-center + = link_to new_admin_label_path, class: "btn gl-mb-3 btn-confirm btn-md gl-button gl-mx-2" do + %span.gl-button-text + = _('New label') diff --git a/app/views/admin/projects/_archived.html.haml b/app/views/admin/projects/_archived.html.haml index 8b4d5806c47..3d79cc7ca71 100644 --- a/app/views/admin/projects/_archived.html.haml +++ b/app/views/admin/projects/_archived.html.haml @@ -1,3 +1,2 @@ - if project.archived - %span.badge.badge-warning - = _('archived') + = gl_badge_tag _('archived'), variant: :warning diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 6f7cea85ed1..f56b77813b5 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -9,8 +9,7 @@ = s_('AdminProjects|Delete') .stats - %span.badge.badge-pill - = storage_counter(project.statistics&.storage_size) + = gl_badge_tag storage_counter(project.statistics&.storage_size) = render_if_exists 'admin/projects/archived', project: project .title = link_to(admin_project_path(project)) do diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 3069aab2710..ee2e63353f0 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -178,7 +178,7 @@ .card-header %strong= @group.name = _('group members') - %span.badge.badge-pill= @group_members.size + = gl_badge_tag @group_members.size = render 'shared/members/manage_access_button', path: group_group_members_path(@group) %ul.content-list.members-list = render partial: 'shared/members/member', @@ -195,7 +195,7 @@ .card-header %strong= @project.name = _('project members') - %span.badge.badge-pill= @project.users.size + = gl_badge_tag @project.users.size = render 'shared/members/manage_access_button', path: project_project_members_path(@project) %ul.content-list.project_members.members-list = render partial: 'shared/members/member', diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 6a5f07dd2db..5977de7c84c 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -43,9 +43,8 @@ = s_('AdminUsers|External') %p.light.gl-pl-2 = s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.') - %row.hidden#warning_external_automatically_set.hidden - .badge.badge-warning.text-white - = s_('AdminUsers|Automatically marked as default internal user') + %row.hidden#warning_external_automatically_set + = gl_badge_tag s_('AdminUsers|Automatically marked as default internal user'), variant: :warning .form-group.row - @user.credit_card_validation || @user.build_credit_card_validation diff --git a/app/views/admin/users/_user_detail.html.haml b/app/views/admin/users/_user_detail.html.haml deleted file mode 100644 index 05e387e6479..00000000000 --- a/app/views/admin/users/_user_detail.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -.flex-list - .flex-row - = image_tag avatar_icon_for_user(user), class: 'avatar s32 d-none d-md-flex', alt: _('Avatar for %{name}') % { name: sanitize_name(user.name) } - .row-main-content - .row-title.str-truncated-100 - = image_tag avatar_icon_for_user(user), class: 'avatar s16 d-xs-flex d-md-none mr-1 gl-mt-2', alt: _('Avatar for %{name}') % { name: sanitize_name(user.name) } - = link_to user.name, admin_user_path(user), class: 'text-plain js-user-link', data: { user_id: user.id, qa_selector: 'username_link' } - - = render 'admin/users/user_listing_note', user: user - - - user_badges_in_admin_section(user).each do |badge| - - css_badge = "badge gl-badge sm badge-pill badge-#{badge[:variant]}" if badge[:variant].present? - %span.px-1.py-1 - %span{ class: css_badge } - = badge[:text] - - .row-second-line.str-truncated-100 - = mail_to user.email, user.email, class: 'text-secondary' - - unless Feature.disabled?(:security_auto_fix) || !user.internal? || user.website_url.blank? - = link_to "(#{_('more information')})", user.website_url diff --git a/app/views/admin/users/projects.html.haml b/app/views/admin/users/projects.html.haml index 8c56e888dcc..b47ed38f65f 100644 --- a/app/views/admin/users/projects.html.haml +++ b/app/views/admin/users/projects.html.haml @@ -17,7 +17,7 @@ %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), 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') + = sprite_icon('remove', size: 16, css_class: 'gl-icon') .row .col-md-6 @@ -47,6 +47,6 @@ - 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 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') + = sprite_icon('remove', size: 16, css_class: 'gl-icon') = render partial: 'admin/users/modals' diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 2a9b4694e7b..bdc5bdabb21 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -35,7 +35,7 @@ %span.light= _('Email:') %strong = render partial: 'shared/email_with_badge', locals: { email: mail_to(@user.email), verified: @user.confirmed? } - - @user.emails.each do |email| + - @user.emails.reject(&:user_primary_email?).each do |email| %li %span.light= _('Secondary email:') %strong |