summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-06-22 10:43:28 -0400
committerJosh Frye <joshfng@gmail.com>2016-06-28 21:35:42 -0400
commit82edef941406eef9e4be12341a064566ac848dce (patch)
tree8cd263d3c9c813c9f1fb3b23245b6f86fd0951b5 /app/views
parentebe21acc2a2f0a569e1e10314ac9407024becafb (diff)
downloadgitlab-ce-82edef941406eef9e4be12341a064566ac848dce.tar.gz
Show basic system info on admin panel. Closes #18886
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/background_jobs/_head.html.haml4
-rw-r--r--app/views/admin/system_info/show.html.haml22
2 files changed, 26 insertions, 0 deletions
diff --git a/app/views/admin/background_jobs/_head.html.haml b/app/views/admin/background_jobs/_head.html.haml
index d78682532ed..5ad99a7f6e0 100644
--- a/app/views/admin/background_jobs/_head.html.haml
+++ b/app/views/admin/background_jobs/_head.html.haml
@@ -1,5 +1,9 @@
.nav-links.sub-nav
%ul{ class: (container_class) }
+ = nav_link(controller: :system_info) do
+ = link_to admin_system_info_path, title: 'System Info' do
+ %span
+ System Info
= nav_link(controller: :background_jobs) do
= link_to admin_background_jobs_path, title: 'Background Jobs' do
%span
diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml
new file mode 100644
index 00000000000..01496e4fcf5
--- /dev/null
+++ b/app/views/admin/system_info/show.html.haml
@@ -0,0 +1,22 @@
+- @no_container = true
+- page_title "System Info"
+= render 'admin/background_jobs/head'
+
+%div{ class: (container_class) }
+ %p
+ .row
+ .col-sm-4
+ .light-well
+ %h4 CPU Load
+ .data
+ %h1= @load
+ .col-sm-4
+ .light-well
+ %h4 Memory
+ .data
+ %h1= "#{@mem_used} / #{@mem_total}"
+ .col-sm-4
+ .light-well
+ %h4 Disk
+ .data
+ %h1= "#{@disk_used} / #{@disk_total}"