Merge branch '31616-add-uptime-of-gitlab-instance-in-admin-area' into 'master'
31616-add-uptime-of-gitlab-instance-in-admin-area Closes #31616 See merge request !11590
This commit is contained in:
commit
1d8de967a1
4 changed files with 13 additions and 0 deletions
|
@ -31,3 +31,8 @@
|
||||||
%h1 #{number_to_human_size(disk[:bytes_used])} / #{number_to_human_size(disk[:bytes_total])}
|
%h1 #{number_to_human_size(disk[:bytes_used])} / #{number_to_human_size(disk[:bytes_total])}
|
||||||
%p= disk[:disk_name]
|
%p= disk[:disk_name]
|
||||||
%p= disk[:mount_path]
|
%p= disk[:mount_path]
|
||||||
|
.col-sm-4
|
||||||
|
.light-well
|
||||||
|
%h4 Uptime
|
||||||
|
.data
|
||||||
|
%h1= time_ago_with_tooltip(Rails.application.config.booted_at)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Add server uptime to System Info page in admin dashboard
|
||||||
|
merge_request: 11590
|
||||||
|
author: Justin Boltz
|
1
config/initializers/server_uptime.rb
Normal file
1
config/initializers/server_uptime.rb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Rails.application.config.booted_at = Time.now
|
|
@ -20,6 +20,7 @@ describe 'Admin System Info' do
|
||||||
expect(page).to have_content 'CPU 2 cores'
|
expect(page).to have_content 'CPU 2 cores'
|
||||||
expect(page).to have_content 'Memory 4 GB / 16 GB'
|
expect(page).to have_content 'Memory 4 GB / 16 GB'
|
||||||
expect(page).to have_content 'Disks'
|
expect(page).to have_content 'Disks'
|
||||||
|
expect(page).to have_content 'Uptime'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ describe 'Admin System Info' do
|
||||||
expect(page).to have_content 'CPU Unable to collect CPU info'
|
expect(page).to have_content 'CPU Unable to collect CPU info'
|
||||||
expect(page).to have_content 'Memory 4 GB / 16 GB'
|
expect(page).to have_content 'Memory 4 GB / 16 GB'
|
||||||
expect(page).to have_content 'Disks'
|
expect(page).to have_content 'Disks'
|
||||||
|
expect(page).to have_content 'Uptime'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -48,6 +50,7 @@ describe 'Admin System Info' do
|
||||||
expect(page).to have_content 'CPU 2 cores'
|
expect(page).to have_content 'CPU 2 cores'
|
||||||
expect(page).to have_content 'Memory Unable to collect memory info'
|
expect(page).to have_content 'Memory Unable to collect memory info'
|
||||||
expect(page).to have_content 'Disks'
|
expect(page).to have_content 'Disks'
|
||||||
|
expect(page).to have_content 'Uptime'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue