summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-07 17:44:35 +0000
committerRémy Coutable <remy@rymai.me>2016-11-07 17:44:35 +0000
commite934043d612d396a5c1cee845780f6397c5d442f (patch)
treeb9d35feec2ef5e7c59b1a01120000291ca1ed533 /app
parent87afcdff9ca0a21d2529cbd198d49c21b83320f9 (diff)
parent16b0723a7ce709437084c12647e59b3a73479ddf (diff)
downloadgitlab-ce-e934043d612d396a5c1cee845780f6397c5d442f.tar.gz
Merge branch '21664-incorrect-workhorse-version-number-displayed' into 'master'
Use the Gitlab Workhorse HTTP header in the admin dashboard Fixes issue #21664 where the GitLab Workhorse version displayed within the Admin Area was not correct for installations from source. See merge request !7332
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