Commit 7f9f7bd7 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'add_bot_count' into 'master'

Add bot count to Users statistics in Admin Area

See merge request gitlab-org/gitlab!25355
parents ced9b0ca 3f6766e4
......@@ -18,6 +18,7 @@ module EE
def stats
@roles_count = ::ProjectAuthorization.roles_stats
@bot_count = ::User.bots.count
end
# The license section may time out if the number of users is
......
......@@ -21,3 +21,9 @@
= sprite_icon('question', size: 16)
%td
= row['amount']
%tr
%td
= s_('AdminArea|Bots')
%td
= @bot_count
---
title: Add bot count to Users statistics in Admin Area
merge_request: 25355
author:
type: added
......@@ -17,6 +17,9 @@ describe 'Admin Dashboard' do
project1.add_reporter(user)
project2.add_developer(user)
create(:user, bot_type: :support_bot)
create(:user, bot_type: :alert_bot)
sign_in(create(:admin))
end
......@@ -63,11 +66,12 @@ describe 'Admin Dashboard' do
end
end
it 'show correct amount of users per role' do
it 'shows correct amounts of users per role', :aggregate_failures do
visit admin_dashboard_stats_path
expect(page).to have_content('Users with highest role developer 2')
expect(page).to have_content('Users with highest role reporter 1')
expect(page).to have_content('Bots 2')
end
end
end
......
......@@ -1281,6 +1281,9 @@ msgstr ""
msgid "Admin notes"
msgstr ""
msgid "AdminArea|Bots"
msgstr ""
msgid "AdminArea|Included Free in license"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment