Skip to content
代码片段 群组 项目
未验证 提交 5e02239d 编辑于 作者: Tomas Bulva's avatar Tomas Bulva 提交者: GitLab
浏览文件

Merge branch 'aregnery/add-stat-cards-to-users-page' into 'master'

No related branches found
No related tags found
无相关合并请求
......@@ -7,7 +7,7 @@
- c.with_body do
= render 'shared/registration_features_discovery_message', feature_title: s_('RegistrationFeatures|send emails to users')
.gl-flex.gl-items-start.gl-flex-wrap.md:gl-flex-nowrap.gl-gap-4.row-content-block.gl-border-0{ data: { testid: "filtered-search-block" } }
.gl-flex.gl-items-start.gl-flex-wrap.md:gl-flex-nowrap.gl-gap-4.gl-py-4.gl-border-0{ data: { testid: "filtered-search-block" } }
#js-admin-users-filter-app
.gl-shrink-0
= gl_redirect_listbox_tag admin_users_sort_options(filter: params[:filter], search_query: params[:search_query]), @sort, data: { placement: 'right' }
......
......@@ -6,10 +6,28 @@
= render_if_exists 'admin/users/admin_export_user_permissions'
= render Pajamas::ButtonComponent.new(variant: :confirm, href: new_admin_user_path) do
= s_('AdminUsers|New user')
.top-area
= render 'tabs'
.tab-content
.tab-pane.active
.gl-grid.gl-gap-5.gl-mt-4.md:gl-grid-cols-3
= render Pajamas::CardComponent.new do |c|
- c.with_body do
%div
= render Pajamas::SingleStatComponent.new(title: s_('AdminUsers|Pending approval'), stat_value: limited_counter_with_delimiter(User.blocked_pending_approval))
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'gl-w-max' }, variant: :link, block: false, href: admin_users_path(filter: "blocked_pending_approval")) do
= s_('AdminUsers|Filter list')
= render Pajamas::CardComponent.new do |c|
- c.with_body do
%div
= render Pajamas::SingleStatComponent.new(title: s_('AdminUsers|Without two-factor authentication'), stat_value: limited_counter_with_delimiter(User.without_two_factor))
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'gl-w-max' }, variant: :link, block: false, href: admin_users_path(filter: "two_factor_disabled")) do
= s_('AdminUsers|Filter list')
= render Pajamas::CardComponent.new do |c|
- c.with_body do
%div
= render Pajamas::SingleStatComponent.new(title: s_('AdminUsers|Administrators'), stat_value: limited_counter_with_delimiter(User.admins))
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'gl-w-max' }, variant: :link, block: false, href: admin_users_path(filter: "admins")) do
= s_('AdminUsers|Filter list')
= render 'users'
......@@ -12,6 +12,24 @@
end
describe 'GET /admin/users' do
describe 'user stat cards' do
before do
visit admin_users_path
end
it "has 'users blocked pending approval' filter" do
expect(page).to have_link(href: admin_users_path(filter: "blocked_pending_approval"))
end
it "has 'users with two factor disabled' filter" do
expect(page).to have_link(href: admin_users_path(filter: "two_factor_disabled"))
end
it "has 'admin users' filter" do
expect(page).to have_link(href: admin_users_path(filter: "admins"))
end
end
describe 'send emails to users' do
context 'when `send_emails_from_admin_area` feature is enabled' do
before do
......
......@@ -4493,6 +4493,9 @@ msgstr ""
msgid "AdminUsers|Administrator"
msgstr ""
 
msgid "AdminUsers|Administrators"
msgstr ""
msgid "AdminUsers|An error occurred while fetching this user's contributions, and the request cannot return the number of issues, merge requests, groups, and projects linked to this user. If you proceed with deleting the user, all their contributions will still be deleted."
msgstr ""
 
......@@ -4604,6 +4607,9 @@ msgstr ""
msgid "AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets."
msgstr ""
 
msgid "AdminUsers|Filter list"
msgstr ""
msgid "AdminUsers|For more information, please refer to the %{link_start}user account deletion documentation.%{link_end}"
msgstr ""
 
......@@ -4820,6 +4826,9 @@ msgstr ""
msgid "AdminUsers|Without projects"
msgstr ""
 
msgid "AdminUsers|Without two-factor authentication"
msgstr ""
msgid "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 %{strongStart}block user%{strongEnd} feature instead. Once you %{strongStart}Delete user%{strongEnd}, it cannot be undone or recovered."
msgstr ""
 
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册