1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
- page_title _('System information')
= render ::Layouts::PageHeadingComponent.new(_('System information'))
.gl-grid.sm:gl-grid-cols-2.md:gl-grid-cols-3.gl-gap-5{ data: { event_tracking_load: 'true', event_tracking: 'view_admin_system_info_pageload' } }
= render Pajamas::CardComponent.new do |c|
- c.with_body do
- if @cpus
.gl-text-secondary.gl-flex.gl-items-center.gl-gap-2.gl-mb-3
= sprite_icon('pod')
= _('CPU')
%h2.gl-my-0= _('%{cores} cores') % { cores: @cpus.length }
- else
.gl-text-orange-600.gl-flex.gl-items-center.gl-gap-2.gl-mb-3
= sprite_icon('pod')
= _('Unable to collect CPU information')
%h2.gl-my-0.gl-text-secondary= _('0 cores')
= render Pajamas::CardComponent.new do |c|
- c.with_body do
- if @memory
.gl-text-secondary.gl-flex.gl-items-center.gl-gap-2.gl-mb-3
= sprite_icon('status-health')
= _('Memory usage')
%h2.gl-mt-0 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)}
- progress = @memory.active_bytes / (@memory.total_bytes / 100)
= render Pajamas::ProgressComponent.new(value: progress, variant: 'primary')
- else
.gl-text-orange-600.gl-flex.gl-items-center.gl-gap-2.gl-mb-3
= sprite_icon('status-health')
= _('Unable to collect memory information')
= render Pajamas::CardComponent.new do |c|
- c.with_body do
.gl-text-secondary.gl-flex.gl-items-center.gl-gap-2.gl-mb-3
= sprite_icon('clock')
= _('System started')
%h2.gl-my-0= time_ago_with_tooltip(Rails.application.config.booted_at)
- @disks.each do |disk|
= render Pajamas::CardComponent.new do |c|
- c.with_body do
.gl-text-secondary.gl-flex.gl-items-center.gl-gap-2.gl-mb-3
= sprite_icon('disk')
= _('Disk usage')
%h2.gl-mt-0 #{number_to_human_size(disk[:bytes_used])} / #{number_to_human_size(disk[:bytes_total])}
- if disk[:bytes_total] == 0
= render Pajamas::ProgressComponent.new(value: 0, variant: 'primary')
- else
- progress = disk[:bytes_used] / (disk[:bytes_total] / 100)
= render Pajamas::ProgressComponent.new(value: progress, variant: 'primary')
.gl-mt-4
%code= disk[:disk_name]
%code= disk[:mount_path]
|