Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-04 11:44:24 +0300
committerDouwe Maan <douwe@gitlab.com>2018-05-04 11:44:24 +0300
commitbee5e26e2d84ce514f2fbedd05bd6e70271142b2 (patch)
tree872cee8fd7f3caeef47dfe6bf4c0e59ed3bb6a6b
parent31fa96960f7d224a1da4ca1cf1520a657558567d (diff)
parent322b5d129c3bebee10fedc1e908ce9aa4b7c23a0 (diff)
Merge branch 'rs-remove-admin-user-badge-counts' into 'master'
Perform a limited count for the badge counts for tabs in the Users admin area Closes #33927 See merge request gitlab-org/gitlab-ce!18661
-rw-r--r--app/views/admin/users/index.html.haml14
-rw-r--r--spec/features/admin/admin_users_spec.rb2
2 files changed, 8 insertions, 8 deletions
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 0ef4b71f4fe..10b8bf5d565 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -42,31 +42,31 @@
= nav_link(html_options: { class: active_when(params[:filter].nil?) }) do
= link_to admin_users_path do
Active
- %small.badge= number_with_delimiter(User.active.count)
+ %small.badge= limited_counter_with_delimiter(User.active)
= nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do
= link_to admin_users_path(filter: "admins") do
Admins
- %small.badge= number_with_delimiter(User.admins.count)
+ %small.badge= limited_counter_with_delimiter(User.admins)
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do
= link_to admin_users_path(filter: 'two_factor_enabled') do
2FA Enabled
- %small.badge= number_with_delimiter(User.with_two_factor.count)
+ %small.badge= limited_counter_with_delimiter(User.with_two_factor)
= nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do
= link_to admin_users_path(filter: 'two_factor_disabled') do
2FA Disabled
- %small.badge= number_with_delimiter(User.without_two_factor.count)
+ %small.badge= limited_counter_with_delimiter(User.without_two_factor)
= nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do
= link_to admin_users_path(filter: 'external') do
External
- %small.badge= number_with_delimiter(User.external.count)
+ %small.badge= limited_counter_with_delimiter(User.external)
= nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do
= link_to admin_users_path(filter: "blocked") do
Blocked
- %small.badge= number_with_delimiter(User.blocked.count)
+ %small.badge= limited_counter_with_delimiter(User.blocked)
= nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do
= link_to admin_users_path(filter: "wop") do
Without projects
- %small.badge= number_with_delimiter(User.without_projects.count)
+ %small.badge= limited_counter_with_delimiter(User.without_projects)
%ul.flex-list.content-list
- if @users.empty?
diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb
index 8f0a3611052..8fc57f4b4c3 100644
--- a/spec/features/admin/admin_users_spec.rb
+++ b/spec/features/admin/admin_users_spec.rb
@@ -285,7 +285,7 @@ describe "Admin::Users" do
it "lists group projects" do
within(:css, '.append-bottom-default + .panel') do
expect(page).to have_content 'Group projects'
- expect(page).to have_link group.name, admin_group_path(group)
+ expect(page).to have_link group.name, href: admin_group_path(group)
end
end