summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChris Wright <chris@dxw.com>2016-08-30 21:44:30 +0100
committerRémy Coutable <remy@rymai.me>2016-11-07 16:15:43 +0100
commit16b0723a7ce709437084c12647e59b3a73479ddf (patch)
treea419356d6a83874ab86e8af35b95f990de52851c /app
parentce03eba57993fb0846c3a164b3eb757dd0a4e0a3 (diff)
downloadgitlab-ce-16b0723a7ce709437084c12647e59b3a73479ddf.tar.gz
Use the Gitlab Workhorse HTTP header in the admin dashboard21664-incorrect-workhorse-version-number-displayed
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r--app/helpers/components_helper.rb9
-rw-r--r--app/views/admin/dashboard/index.html.haml2
2 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/components_helper.rb b/app/helpers/components_helper.rb
new file mode 100644
index 00000000000..8893209b314
--- /dev/null
+++ b/app/helpers/components_helper.rb
@@ -0,0 +1,9 @@
+module ComponentsHelper
+ def gitlab_workhorse_version
+ if request.headers['Gitlab-Workhorse'].present?
+ request.headers['Gitlab-Workhorse'].split('-').first
+ else
+ Gitlab::Workhorse.version
+ end
+ end
+end
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 90798c47d97..1db2150f336 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -87,7 +87,7 @@
%p
GitLab Workhorse
%span.pull-right
- = Gitlab::Workhorse.version
+ = gitlab_workhorse_version
%p
GitLab API
%span.pull-right