summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-01-30 11:11:47 +0100
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-01-31 08:54:45 +0100
commit94a3dbca33634dd4f6a1de8b14cd2a4f0a9a0abc (patch)
tree6a21432626eb9b37b748cb8a94403ea771025f22 /app
parente74e6fcb5eecb7841a412cb0d3e9627556d83eaf (diff)
downloadgitlab-ce-94a3dbca33634dd4f6a1de8b14cd2a4f0a9a0abc.tar.gz
Gitaly Server info for admin panel
Implements the client side for gitlab-org/gitaly#819. Which is a server info command. This checks the server version and git binairy version on the server. A small UI was added for administrators, so they can check the status of the Gitaly server. This is done for each storage the monolith knows. Because of this commit, gitlab-org/gitlab-ce!15580 is now closed. That MR removed the Git version too, but didn't replace it with anything.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/gitaly_servers_controller.rb5
-rw-r--r--app/views/admin/dashboard/index.html.haml10
-rw-r--r--app/views/admin/gitaly_servers/index.html.haml31
3 files changed, 38 insertions, 8 deletions
diff --git a/app/controllers/admin/gitaly_servers_controller.rb b/app/controllers/admin/gitaly_servers_controller.rb
new file mode 100644
index 00000000000..11c4dfe3d8d
--- /dev/null
+++ b/app/controllers/admin/gitaly_servers_controller.rb
@@ -0,0 +1,5 @@
+class Admin::GitalyServersController < Admin::ApplicationController
+ def index
+ @gitaly_servers = Gitaly::Server.all
+ end
+end
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 509f559c120..d251f75a8fd 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -138,20 +138,12 @@
GitLab API
%span.pull-right
= API::API::version
- %p
- Gitaly
- %span.pull-right
- = Gitlab::GitalyClient.expected_server_version
- if Gitlab.config.pages.enabled
%p
GitLab Pages
%span.pull-right
= Gitlab::Pages::VERSION
%p
- Git
- %span.pull-right
- = Gitlab::Git.version
- %p
Ruby
%span.pull-right
#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
@@ -163,6 +155,8 @@
= Gitlab::Database.adapter_name
%span.pull-right
= Gitlab::Database.version
+ %p
+ = link_to "Gitaly Servers", admin_gitaly_servers_path
.row
.col-md-4
.info-well
diff --git a/app/views/admin/gitaly_servers/index.html.haml b/app/views/admin/gitaly_servers/index.html.haml
new file mode 100644
index 00000000000..231f94dc95d
--- /dev/null
+++ b/app/views/admin/gitaly_servers/index.html.haml
@@ -0,0 +1,31 @@
+- breadcrumb_title _("Gitaly Servers")
+
+%h3.page-title= _("Gitaly Servers")
+%hr
+.gitaly_servers
+ - if @gitaly_servers.any?
+ .table-holder
+ %table.table.responsive-table
+ %thead.hidden-sm.hidden-xs
+ %tr
+ %th= _("Storage")
+ %th= n_("Gitaly|Address")
+ %th= _("Server version")
+ %th= _("Git version")
+ %th= _("Up to date")
+ - @gitaly_servers.each do |server|
+ %tr
+ %td
+ = server.storage
+ %td
+ = server.address
+ %td
+ = server.server_version
+ %td
+ = server.git_binary_version
+ %td
+ = boolean_to_icon(server.up_to_date?)
+ - else
+ .empty-state
+ .text-center
+ %h4= _("No connection could be made to a Gitaly Server, please check your logs!")