Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3f6766e4
Commit
3f6766e4
authored
Feb 17, 2020
by
Corinna Wiesner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bot count to Users statistics in Admin Area
Break down total user count by showing how many bots exist.
parent
46afb71c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
1 deletion
+20
-1
ee/app/controllers/ee/admin/dashboard_controller.rb
ee/app/controllers/ee/admin/dashboard_controller.rb
+1
-0
ee/app/views/admin/dashboard/stats.html.haml
ee/app/views/admin/dashboard/stats.html.haml
+6
-0
ee/changelogs/unreleased/add_bot_count.yml
ee/changelogs/unreleased/add_bot_count.yml
+5
-0
ee/spec/features/admin/admin_dashboard_spec.rb
ee/spec/features/admin/admin_dashboard_spec.rb
+5
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/controllers/ee/admin/dashboard_controller.rb
View file @
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
...
...
ee/app/views/admin/dashboard/stats.html.haml
View file @
3f6766e4
...
...
@@ -21,3 +21,9 @@
=
sprite_icon
(
'question'
,
size:
16
)
%td
=
row
[
'amount'
]
%tr
%td
=
s_
(
'AdminArea|Bots'
)
%td
=
@bot_count
ee/changelogs/unreleased/add_bot_count.yml
0 → 100644
View file @
3f6766e4
---
title
:
Add bot count to Users statistics in Admin Area
merge_request
:
25355
author
:
type
:
added
ee/spec/features/admin/admin_dashboard_spec.rb
View file @
3f6766e4
...
...
@@ -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
'show
s 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
...
...
locale/gitlab.pot
View file @
3f6766e4
...
...
@@ -1281,6 +1281,9 @@ msgstr ""
msgid "Admin notes"
msgstr ""
msgid "AdminArea|Bots"
msgstr ""
msgid "AdminArea|Included Free in license"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment