diff options
Diffstat (limited to 'app/views/admin/dashboard')
-rw-r--r-- | app/views/admin/dashboard/_stats_users_table.html.haml | 49 | ||||
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 9 | ||||
-rw-r--r-- | app/views/admin/dashboard/stats.html.haml | 66 |
3 files changed, 64 insertions, 60 deletions
diff --git a/app/views/admin/dashboard/_stats_users_table.html.haml b/app/views/admin/dashboard/_stats_users_table.html.haml new file mode 100644 index 00000000000..473384b8961 --- /dev/null +++ b/app/views/admin/dashboard/_stats_users_table.html.haml @@ -0,0 +1,49 @@ +%table.table.gl-text-gray-500 + %tr + %td.gl-p-5! + = s_('AdminArea|Users without a Group and Project') + = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.without_groups_and_projects + = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Reporter') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_reporter + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Developer') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_developer + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Maintainer') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_maintainer + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Owner') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_owner + %tr + %td.gl-p-5! + = s_('AdminArea|Users with highest role') + %strong + = s_('AdminArea|Guest') + = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_guest + %tr + %td.gl-p-5! + = s_('AdminArea|Bots') + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.bots diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 27ae7d523b9..8afddd99451 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -164,10 +164,11 @@ = _('Rails') %span.float-right #{Rails::VERSION::STRING} - %p - = ApplicationRecord.database.human_adapter_name - %span.float-right - = ApplicationRecord.database.version + - database_versions.each do |database_name, database| + %p + #{database[:adapter_name]} (#{database_name}) + %span.float-right + = database[:version] %p = _('Redis') %span.float-right diff --git a/app/views/admin/dashboard/stats.html.haml b/app/views/admin/dashboard/stats.html.haml index e0701812ba3..0a5a425397f 100644 --- a/app/views/admin/dashboard/stats.html.haml +++ b/app/views/admin/dashboard/stats.html.haml @@ -2,63 +2,15 @@ %h3.gl-my-6 = s_('AdminArea|Users statistics') + += render 'admin/dashboard/stats_users_table', user_statistics: @users_statistics + +%p.gl-font-weight-bold.gl-mt-8 + = s_('AdminArea|Totals') + %table.table.gl-text-gray-500 - %tr - %td.gl-p-5! - = s_('AdminArea|Users without a Group and Project') - = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.without_groups_and_projects - = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Guest') - = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_guest - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Reporter') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_reporter - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Developer') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_developer - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Maintainer') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_maintainer - %tr - %td.gl-p-5! - = s_('AdminArea|Users with highest role') - %strong - = s_('AdminArea|Owner') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.with_highest_role_owner - %tr - %td.gl-p-5! - = s_('AdminArea|Bots') - %td.gl-text-right{ class: 'gl-p-5!' } - = @users_statistics&.bots - = render_if_exists 'admin/dashboard/billable_users_row' - %tr.bg-gray-light.gl-text-gray-900 - %td.gl-p-5! - %strong - = s_('AdminArea|Active users') - %td.gl-text-right{ class: 'gl-p-5!' } - %strong - = @users_statistics&.active + = render_if_exists 'admin/dashboard/stats_active_users_row', users_statistics: @users_statistics + %tr.bg-gray-light.gl-text-gray-900 %td.gl-p-5! %strong @@ -70,6 +22,8 @@ %td.gl-p-5! %strong = s_('AdminArea|Total users') + %span + (#{s_('AdminArea|active users + blocked users')}) %td.gl-text-right{ class: 'gl-p-5!' } %strong = @users_statistics&.total |