diff --git a/app/assets/javascripts/admin/statistics_panel/components/app.vue b/app/assets/javascripts/admin/statistics_panel/components/app.vue index 47ec4af373c33389ad957e83e58d7dbd3b04c770..077da7c7345a1cc9789c4495ee6b6e85d231fc44 100644 --- a/app/assets/javascripts/admin/statistics_panel/components/app.vue +++ b/app/assets/javascripts/admin/statistics_panel/components/app.vue @@ -28,20 +28,24 @@ export default { </script> <template> - <gl-card> - <h4 class="gl-heading-4">{{ __('Statistics') }}</h4> - <slot name="footer"> - <gl-loading-icon v-if="isLoading" size="lg" class="my-3" /> + <gl-card class="gl-h-full" footer-class="gl-h-full gl-py-0"> + <template #default> + <h3 class="gl-m-0 gl-inline-flex gl-items-center gl-gap-2 gl-self-center gl-text-base"> + {{ __('Statistics') }} + </h3> + </template> + <template #footer> + <gl-loading-icon v-if="isLoading" size="md" class="my-3" /> <template v-else> <p v-for="statistic in getStatistics(statisticsLabels)" :key="statistic.key" - class="js-stats" + :class="['js-stats', 'gl-py-4', 'gl-m-0', 'gl-border-b', 'last:gl-border-b-0']" > {{ statistic.label }} <span class="light gl-float-right">{{ statistic.value }}</span> </p> </template> - </slot> + </template> </gl-card> </template> diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index ad4c51ee5489dc43fbfe33d44b16d0e4bcfc2cb0..9933ed925c23d1aee3b503a88aef64287d9fdc95 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -7,30 +7,35 @@ def has_start_trial? false end - def feature_entry(title, href: nil, enabled: true, doc_href: nil) - enabled_text = enabled ? 'on' : 'off' - label = "#{title}: status #{enabled_text}" - link_or_title = href && enabled ? tag.a(title, href: href) : title + def feature_entry(title, href: nil, enabled: true, doc_href: nil, last: false, css_class: nil) + enabled_text = enabled ? 'enabled' : 'not enabled' + label = "#{title}: #{enabled_text}" + link_or_title = title - tag.p(aria: { label: label }) do + tag.p(aria: { label: label }, class: ['gl-py-4', 'gl-m-0', ('gl-border-b' unless last), css_class].compact) do concat(link_or_title) - concat(tag.span(class: %w[light gl-float-right]) do - boolean_to_icon(enabled) + concat(tag.span(class: %w[gl-float-right]) do + concat(boolean_to_icon(enabled)) + + if href.present? + concat(render(Pajamas::ButtonComponent.new(icon: 'settings', category: :tertiary, size: :small, href: href, + button_options: { title: _('Configure'), class: 'gl-ml-2 has-tooltip', aria: { label: _('Configure') } }))) + end + + if doc_href.present? + link_to_doc = link_to( + sprite_icon('question-o'), + doc_href, + class: 'gl-ml-4 gl-mr-2 has-tooltip', + title: _('Documentation'), + target: '_blank', + rel: 'noopener noreferrer' + ) + + concat(link_to_doc) + end end) - - if doc_href.present? - link_to_doc = link_to( - sprite_icon('question-o'), - doc_href, - class: 'gl-ml-2', - title: _('Documentation'), - target: '_blank', - rel: 'noopener noreferrer' - ) - - concat(link_to_doc) - end end end diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 00a0990c3705fca36d74b10eafe01b3160688a69..06dc99981f70042b42d53c4d9a0948c858978f8a 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -102,9 +102,10 @@ def audit_icon(name, css_class: nil) def boolean_to_icon(value) if value - sprite_icon('check', css_class: 'gl-text-green-500') + sprite_icon('check', + css_class: 'gl-text-green-500') + content_tag(:span, _('Enabled'), class: 'gl-pl-2 gl-text-secondary') else - sprite_icon('power', css_class: 'gl-text-gray-500') + content_tag(:span, _('Not enabled'), class: 'gl-text-secondary') end end diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 930ee2aedc4c7c9ea623ee415a69dca6cf27b661..520e688d972cb05418034ba309638f1608ac7143 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -1,7 +1,5 @@ - breadcrumb_title _("Dashboard") - page_title _("Dashboard") -- billable_users_url = help_page_path('subscriptions/self_managed/index.md', 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_quarterly_reconciliation_banner' = render_if_exists 'shared/submit_license_usage_data_banner' @@ -19,190 +17,176 @@ dismissible: true.to_s } } = notice[:message].html_safe +%h1.gl-sr-only= page_title + - if @license.present? .license-panel.gl-mt-5 = render_if_exists 'admin/licenses/summary' = render_if_exists 'admin/licenses/breakdown' .admin-dashboard.gl-mt-3{ data: { event_tracking_load: 'true', event_tracking: 'view_admin_dashboard_pageload' } } - .h3.gl-mb-5.gl-mt-0= _('Instance overview') - .row - - component_params = { body_options: { class: 'gl-flex gl-justify-between gl-items-start' } } - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new(**component_params) do |c| - - c.with_body do - %div - - approximate_projects_count = approximate_count_with_delimiters(@counts, Project) - = render Pajamas::SingleStatComponent.new(title_icon: 'project', title: s_('AdminArea|Projects'), stat_value: approximate_projects_count) - = render Pajamas::ButtonComponent.new(href: new_project_path) do - = s_('AdminArea|New project') - - c.with_footer do - .gl-flex.gl-items-center - = link_to(s_('AdminArea|View latest projects'), admin_projects_path(sort: 'created_desc')) - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new(**component_params) do |c| - - c.with_body do - %div - = render Pajamas::SingleStatComponent.new(title_icon: 'users', title: s_('AdminArea|Users')) do |c| - - c.with_stat_value do - .gl-flex.gl-items-center.gl-gap-3 - %span= approximate_count_with_delimiters(@counts, User) - %a.gl-flex.gl-cursor-pointer{ tabindex: "0", data: { container: "body", - toggle: "popover", - placement: "top", - html: "true", - trigger: "focus", - content: s_("AdminArea|All users created in the instance, including users who are not %{billable_users_link_start}billable users%{billable_users_link_end}.").html_safe % { billable_users_link_start: billable_users_link_start, billable_users_link_end: '</a>'.html_safe }, - } } - = sprite_icon('question-o', size: 16, css_class: 'gl-text-blue-600') - end - = render Pajamas::ButtonComponent.new(href: new_admin_user_path) do - = s_('AdminArea|New user') - - c.with_footer do - .gl-flex.gl-flex-wrap.gl-items-center.gl-gap-2 - = link_to(s_('AdminArea|View latest users'), admin_users_path({ sort: 'created_desc' })) - %span.gl-text-secondary= "/" - = link_to(s_('AdminArea|Users statistics'), admin_dashboard_stats_path, class: "gl-text-base gl-font-normal gl-text-capitalize") - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new(**component_params) do |c| - - c.with_body do - %div - - approximate_groups_count = approximate_count_with_delimiters(@counts, Group) - = render Pajamas::SingleStatComponent.new(title_icon: 'group', title: s_('AdminArea|Groups'), stat_value: approximate_groups_count) - = render Pajamas::ButtonComponent.new(href: new_admin_group_path) do - = s_('AdminArea|New group') - - c.with_footer do - .gl-flex.gl-items-center - = link_to(s_('AdminArea|View latest groups'), admin_groups_path(sort: 'created_desc')) - .row - .col-md-4.gl-mb-6 - #js-admin-statistics-container - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new do |c| - - c.with_body do - %h4.gl-heading-4= s_('AdminArea|Features') - = feature_entry(_('Sign up'), - href: general_admin_application_settings_path(anchor: 'js-signup-settings'), - enabled: allow_signup?) - - = feature_entry(_('LDAP'), - enabled: Gitlab.config.ldap.enabled, - doc_href: help_page_path('administration/auth/ldap/index.md')) - - = feature_entry(_('Gravatar'), - href: general_admin_application_settings_path(anchor: 'js-account-settings'), - enabled: gravatar_enabled?) - - = feature_entry(_('OmniAuth'), - href: general_admin_application_settings_path(anchor: 'js-signin-settings'), - enabled: Gitlab::Auth.omniauth_enabled?, - doc_href: help_page_path('integration/omniauth.md')) - - = feature_entry(_('Reply by email'), - enabled: Gitlab::Email::IncomingEmail.enabled?, - doc_href: help_page_path('administration/reply_by_email.md')) - - = render_if_exists 'admin/dashboard/elastic_and_geo' - - = feature_entry(_('Container Registry'), - href: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), - enabled: Gitlab.config.registry.enabled, - doc_href: help_page_path('user/packages/container_registry/index.md')) - - = feature_entry(_('GitLab Pages'), - enabled: Gitlab.config.pages.enabled, - doc_href: help_instance_configuration_url) - - = feature_entry(_('Instance Runners'), - href: admin_runners_path, - enabled: Gitlab.config.gitlab_ci.shared_runners_enabled) - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new do |c| - - c.with_body do - %h4.gl-heading-4 - = s_('AdminArea|Components') - - if show_version_check? - .gl-float-right - .js-gitlab-version-check-badge{ data: { "size": "lg", "actionable": "true", "version": gitlab_version_check.to_json } } - = link_to(sprite_icon('question-o'), "https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md", class: 'gl-ml-2', target: '_blank', rel: 'noopener noreferrer') - %p - = link_to _('GitLab'), general_admin_application_settings_path - %span.gl-float-right - = link_to_version - %p - = _('GitLab Shell') - %span.gl-float-right - = Gitlab::Shell.version - %p - = _('GitLab Workhorse') - %span.gl-float-right - = gitlab_workhorse_version - %p - = _('GitLab API') - %span.gl-float-right - = API::API::version - - if Gitlab.config.pages.enabled - %p - = _('GitLab Pages') - %span.gl-float-right - = Gitlab::Pages::VERSION - - if Gitlab::Kas.enabled? - %p - = _('GitLab KAS') - %span.gl-float-right - = Gitlab::Kas.display_version_info - - = render_if_exists 'admin/dashboard/geo' - - %p - = _('Ruby') - %span.gl-float-right - #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} - %p - = _('Rails') - %span.gl-float-right - #{Rails::VERSION::STRING} - - database_versions.each do |database_name, database| - %p - #{database[:adapter_name]} (#{database_name}) - %span.gl-float-right - = database[:version] - %p - = _('Redis') - %span.gl-float-right - = @redis_versions&.join(", ") - %p - = link_to _("Gitaly servers"), admin_gitaly_servers_path - .row - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new do |c| - - c.with_body do - %h4.gl-heading-4= s_('AdminArea|Latest projects') + %h2.gl-heading-2= _('Instance overview') + .gl-grid.md:gl-grid-cols-2.lg:gl-grid-cols-3.gl-gap-5 + - component_params = { card_options: { class: 'gl-h-full' }, body_options: { class: 'gl-flex gl-justify-between gl-items-start' }, footer_options: { class: 'gl-h-full gl-pt-0' } } + = render Pajamas::CardComponent.new(**component_params) do |c| + - c.with_body do + %h3.gl-self-center.gl-text-base.gl-inline-flex.gl-gap-2.gl-items-center.gl-m-0 + - approximate_projects_count = approximate_count_with_delimiters(@counts, Project) + = s_('AdminArea|Projects') + = render Pajamas::BadgeComponent.new(approximate_projects_count, variant: :muted) + = render Pajamas::ButtonComponent.new(href: new_project_path, size: :small) do + = s_('AdminArea|New project') + - c.with_footer do + .gl-flex.gl-flex-col.gl-h-full - @projects.each do |project| - .gl-flex.gl-py-3 + .gl-flex.gl-py-4{ class: ('gl-border-b' if @projects.last != project) } .gl-mr-auto.gl-overflow-hidden.gl-text-ellipsis = link_to project.full_name, admin_project_path(project) - %span.gl-whitespace-nowrap.gl-text-right + %span.gl-whitespace-nowrap.gl-text-right.gl-text-sm.gl-text-subtle #{time_ago_with_tooltip(project.created_at)} - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new do |c| - - c.with_body do - %h4.gl-heading-4= s_('AdminArea|Latest users') + .gl-grow + .gl-pt-4 + = render Pajamas::ButtonComponent.new(href: admin_projects_path(sort: 'created_desc'), block: true) do + = s_('AdminArea|View latest projects') + = render Pajamas::CardComponent.new(**component_params) do |c| + - c.with_body do + %h3.gl-self-center.gl-text-base.gl-inline-flex.gl-gap-2.gl-items-center.gl-m-0 + = s_('AdminArea|Total Users') + = render Pajamas::BadgeComponent.new(approximate_count_with_delimiters(@counts, User), variant: :muted) + = render Pajamas::ButtonComponent.new(href: new_admin_user_path, size: :small) do + = s_('AdminArea|New user') + - c.with_footer do + .gl-flex.gl-flex-col.gl-h-full - @users.each do |user| - .gl-flex.gl-py-3 + .gl-flex.gl-py-4{ class: ('gl-border-b' if @users.last != user) } .gl-mr-auto.gl-overflow-hidden.gl-text-ellipsis = link_to [:admin, user] do = user.name - %span.gl-whitespace-nowrap.gl-text-right + %span.gl-whitespace-nowrap.gl-text-right.gl-text-sm.gl-text-subtle #{time_ago_with_tooltip(user.created_at)} - .col-md-4.gl-mb-6 - = render Pajamas::CardComponent.new do |c| - - c.with_body do - %h4.gl-heading-4= s_('AdminArea|Latest groups') + .gl-grow + .gl-flex.gl-pt-4.gl-gap-3 + = render Pajamas::ButtonComponent.new(href: admin_users_path(sort: 'created_desc'), block: true) do + = s_('AdminArea|View latest users') + = render Pajamas::ButtonComponent.new(href: admin_dashboard_stats_path, block: true, button_options: { class: '!gl-mt-0'}) do + = s_('AdminArea|Users statistics') + = render Pajamas::CardComponent.new(**component_params) do |c| + - c.with_body do + %h3.gl-self-center.gl-text-base.gl-inline-flex.gl-gap-2.gl-items-center.gl-m-0 + - approximate_groups_count = approximate_count_with_delimiters(@counts, Group) + = s_('AdminArea|Groups') + = render Pajamas::BadgeComponent.new(approximate_groups_count, variant: :muted) + = render Pajamas::ButtonComponent.new(href: new_admin_group_path, size: :small) do + = s_('AdminArea|New group') + - c.with_footer do + .gl-flex.gl-flex-col.gl-h-full - @groups.each do |group| - .gl-flex.gl-py-3 + .gl-flex.gl-py-4{ class: ('gl-border-b' if @groups.last != group) } .gl-mr-auto.gl-overflow-hidden.gl-text-ellipsis = link_to [:admin, group] do = group.full_name - %span.gl-whitespace-nowrap.gl-text-right + %span.gl-whitespace-nowrap.gl-text-right.gl-text-sm.gl-text-subtle #{time_ago_with_tooltip(group.created_at)} + .gl-grow + .gl-pt-4 + = render Pajamas::ButtonComponent.new(href: admin_groups_path(sort: 'created_desc'), block: true) do + = s_('AdminArea|View latest groups') + + #js-admin-statistics-container + = render Pajamas::CardComponent.new(card_options: { class: 'gl-h-full' }, footer_options: { class: 'gl-h-full gl-py-0' }) do |c| + - c.with_body do + %h3.gl-self-center.gl-text-base.gl-inline-flex.gl-gap-2.gl-items-center.gl-m-0 + = s_('AdminArea|Features') + - c.with_footer do + = feature_entry(_('Sign up'), + href: general_admin_application_settings_path(anchor: 'js-signup-settings'), + enabled: allow_signup?) + + = feature_entry(_('LDAP'), + enabled: Gitlab.config.ldap.enabled, + doc_href: help_page_path('administration/auth/ldap/index.md')) + + = feature_entry(_('Gravatar'), + href: general_admin_application_settings_path(anchor: 'js-account-settings'), + enabled: gravatar_enabled?) + + = feature_entry(_('OmniAuth'), + href: general_admin_application_settings_path(anchor: 'js-signin-settings'), + enabled: Gitlab::Auth.omniauth_enabled?) + + = feature_entry(_('Reply by email'), + enabled: Gitlab::Email::IncomingEmail.enabled?, + doc_href: help_page_path('administration/reply_by_email.md')) + + = render_if_exists 'admin/dashboard/elastic_and_geo' + + = feature_entry(_('Container Registry'), + href: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), + enabled: Gitlab.config.registry.enabled) + + = feature_entry(_('GitLab Pages'), + enabled: Gitlab.config.pages.enabled, + doc_href: help_instance_configuration_url) + + = feature_entry(_('Instance Runners'), + href: admin_runners_path, + enabled: Gitlab.config.gitlab_ci.shared_runners_enabled, + last: true) + = render Pajamas::CardComponent.new(card_options: { class: 'gl-h-full' }, footer_options: { class: 'gl-h-full gl-py-0' }) do |c| + - c.with_body do + %h3.gl-m-0.gl-inline-flex.gl-items-center.gl-gap-2.gl-self-center.gl-text-base + = s_('AdminArea|Components') + - c.with_footer do + - if show_version_check? + .gl-min-h-9.gl-py-4.gl-border-b + .js-gitlab-version-check-badge{ data: { "size": "lg", "actionable": "true", "version": gitlab_version_check.to_json } } + = link_to('CHANGELOG', 'https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md', target: 'blank', rel: 'noopener noreferrer', class: 'gl-float-right gl-font-monospace' ) + %p.gl-py-4.gl-m-0.gl-border-b + = _('GitLab version') + %span.gl-float-right.gl-font-monospace + = link_to_version + %p.gl-py-4.gl-m-0.gl-border-b + = _('GitLab Shell') + %span.gl-float-right.gl-font-monospace + = Gitlab::Shell.version + %p.gl-py-4.gl-m-0.gl-border-b + = _('GitLab Workhorse') + %span.gl-float-right.gl-font-monospace + = gitlab_workhorse_version + %p.gl-py-4.gl-m-0.gl-border-b + = _('GitLab API') + %span.gl-float-right.gl-font-monospace + = API::API::version + - if Gitlab.config.pages.enabled + %p.gl-py-4.gl-m-0.gl-border-b + = _('GitLab Pages') + %span.gl-float-right.gl-truncate-end.gl-truncate-start.gl-font-monospace{ class: 'gl-max-w-1/2' , data: { toggle: 'tooltip' }, title: Gitlab::Pages::VERSION } + = Gitlab::Pages::VERSION + - if Gitlab::Kas.enabled? + %p.gl-py-4.gl-m-0.gl-border-b + = _('GitLab KAS') + %span.gl-float-right.gl-font-monospace + = Gitlab::Kas.display_version_info + + = render_if_exists 'admin/dashboard/geo' + + %p.gl-py-4.gl-m-0.gl-border-b + = _('Ruby') + %span.gl-float-right.gl-font-monospace + #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} + %p.gl-py-4.gl-m-0.gl-border-b + = _('Rails') + %span.gl-float-right.gl-font-monospace + #{Rails::VERSION::STRING} + - database_versions.each do |database_name, database| + %p.gl-py-4.gl-m-0.gl-border-b + #{database[:adapter_name]} (#{database_name}) + %span.gl-float-right.gl-font-monospace + = database[:version] + %p.gl-py-4.gl-m-0.gl-border-b + = _('Redis') + %span.gl-float-right.gl-font-monospace + = @redis_versions&.join(", ") + %p.gl-py-4.gl-m-0 + = _("Gitaly servers") + = render Pajamas::ButtonComponent.new(icon: 'settings', category: :tertiary, size: :small, href: admin_gitaly_servers_path, button_options: { title: _('Configure'), class: 'gl-ml-2 has-tooltip gl-float-right', aria: { label: _('Configure') } }) diff --git a/ee/app/views/admin/dashboard/_elastic_and_geo.html.haml b/ee/app/views/admin/dashboard/_elastic_and_geo.html.haml index 1473f14f1a383fb7b94d5482e7dcaa7b652fc701..bfb0988e4aaa511a8e99ca48995620ac958d2112 100644 --- a/ee/app/views/admin/dashboard/_elastic_and_geo.html.haml +++ b/ee/app/views/admin/dashboard/_elastic_and_geo.html.haml @@ -1,9 +1,7 @@ = feature_entry(_('Advanced Search'), href: advanced_search_admin_application_settings_path(anchor: 'js-elasticsearch-settings'), - doc_href: help_page_path('integration/advanced_search/elasticsearch.md'), enabled: Gitlab::CurrentSettings.elasticsearch_search?) = feature_entry(_('Geo'), href: admin_geo_nodes_path, - doc_href: help_page_path('administration/geo/index.md'), enabled: Gitlab::Geo.enabled?) diff --git a/ee/app/views/admin/dashboard/_geo.html.haml b/ee/app/views/admin/dashboard/_geo.html.haml index 65cc10ff4c2b95f17d8b468e181ec698d31327f7..bc0df1e45869fac2c751ab90e292710edf65ed7c 100644 --- a/ee/app/views/admin/dashboard/_geo.html.haml +++ b/ee/app/views/admin/dashboard/_geo.html.haml @@ -1,6 +1,7 @@ - return unless Gitlab::Geo.enabled? -%p - = link_to _('Geo'), admin_geo_nodes_path - %span.gl-float-right +%p.gl-py-4.gl-m-0.gl-border-b + = _('Geo') + %span.gl-float-right.gl-font-monospace = pluralize(GeoNode.count, _('site')) + = render Pajamas::ButtonComponent.new(icon: 'settings', category: :tertiary, size: :small, href: admin_geo_nodes_path, button_options: { title: _('Configure'), class: 'gl-ml-2 has-tooltip', aria: { label: _('Configure') } }) diff --git a/ee/app/views/admin/licenses/_summary.html.haml b/ee/app/views/admin/licenses/_summary.html.haml index 865744f387f08808e61e050978b74e6415fb9d0a..f373f941ab1c43582559929da5618f5dd2bb6b69 100644 --- a/ee/app/views/admin/licenses/_summary.html.haml +++ b/ee/app/views/admin/licenses/_summary.html.haml @@ -1,4 +1,4 @@ -.h3.gl-mb-5= _('License overview') +%h2.gl-heading-2= _('License overview') = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-flex gl-justify-between gl-items-center' }) do |c| - c.with_body do diff --git a/ee/spec/features/admin/admin_dashboard_spec.rb b/ee/spec/features/admin/admin_dashboard_spec.rb index cd665fbfd8c3c067bf9543f5cf6620977dda17b8..43525023b3ca3eec43860c4a05bd899c705fd9a0 100644 --- a/ee/spec/features/admin/admin_dashboard_spec.rb +++ b/ee/spec/features/admin/admin_dashboard_spec.rb @@ -104,7 +104,7 @@ visit admin_root_path page.within('.admin-dashboard') do - expect(find('.badge')).to have_content('Up to date') + expect(find_by_testid('check-version-badge')).to have_content('Up to date') end end end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index a04fe4a98231f90b51e89bc5e04e438cc38ddbac..a99c26b89e582087b4fcf444e7faa0b275c12066 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3633,9 +3633,6 @@ msgstr "" msgid "AdminArea|Active users" msgstr "" -msgid "AdminArea|All users created in the instance, including users who are not %{billable_users_link_start}billable users%{billable_users_link_end}." -msgstr "" - msgid "AdminArea|Are you sure?" msgstr "" @@ -3693,15 +3690,6 @@ msgstr "" msgid "AdminArea|Instance OAuth applications" msgstr "" -msgid "AdminArea|Latest groups" -msgstr "" - -msgid "AdminArea|Latest projects" -msgstr "" - -msgid "AdminArea|Latest users" -msgstr "" - msgid "AdminArea|Maintainer" msgstr "" @@ -3750,6 +3738,9 @@ msgstr "" msgid "AdminArea|Total Non-Billable users" msgstr "" +msgid "AdminArea|Total Users" +msgstr "" + msgid "AdminArea|Total users" msgstr "" @@ -3759,9 +3750,6 @@ msgstr "" msgid "AdminArea|Updated %{last_update_time}" msgstr "" -msgid "AdminArea|Users" -msgstr "" - msgid "AdminArea|Users statistics" msgstr "" @@ -36495,6 +36483,9 @@ msgstr "" msgid "Not eligible to rotate token with access level higher than the user" msgstr "" +msgid "Not enabled" +msgstr "" + msgid "Not found" msgstr "" diff --git a/spec/features/admin/dashboard_spec.rb b/spec/features/admin/dashboard_spec.rb index 9e8f513881528d128caf4de2c92254e2e057c9c9..a7ad3a05c35302f6b8e85304f535480085ec8fd7 100644 --- a/spec/features/admin/dashboard_spec.rb +++ b/spec/features/admin/dashboard_spec.rb @@ -58,7 +58,7 @@ visit admin_root_path page.within('.admin-dashboard') do - expect(find('.badge')).to have_content('Up to date') + expect(find_by_testid('check-version-badge')).to have_content('Up to date') end end end diff --git a/spec/helpers/dashboard_helper_spec.rb b/spec/helpers/dashboard_helper_spec.rb index 95e69ebc0702a8fa99cdae5a18b3cbc02a6e207e..4b8e73fbe779f56901fb5fe5ff586431df1e95e0 100644 --- a/spec/helpers/dashboard_helper_spec.rb +++ b/spec/helpers/dashboard_helper_spec.rb @@ -12,22 +12,22 @@ describe '#feature_entry' do shared_examples "a feature is enabled" do - it { is_expected.to include('<p aria-label="Demo: status on">') } + it { is_expected.to include('<p aria-label="Demo: enabled" class="gl-py-4 gl-m-0 gl-border-b">') } end shared_examples "a feature is disabled" do - it { is_expected.to include('<p aria-label="Demo: status off">') } + it { is_expected.to include('<p aria-label="Demo: not enabled" class="gl-py-4 gl-m-0 gl-border-b">') } end shared_examples "a feature without link" do it do - is_expected.not_to have_link('Demo') + is_expected.not_to have_link('Configure') is_expected.not_to have_link('Documentation') end end shared_examples "a feature with configuration" do - it { is_expected.to have_link('Demo', href: 'demo.link') } + it { is_expected.to have_link('Configure', href: 'demo.link') } end shared_examples "a feature with documentation" do @@ -66,7 +66,7 @@ subject { feature_entry('Demo', href: 'demo.link', enabled: false) } it_behaves_like 'a feature is disabled' - it_behaves_like 'a feature without link' + it_behaves_like 'a feature with configuration' end end