diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-07 17:44:35 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-07 17:44:35 +0000 |
commit | e934043d612d396a5c1cee845780f6397c5d442f (patch) | |
tree | b9d35feec2ef5e7c59b1a01120000291ca1ed533 /app | |
parent | 87afcdff9ca0a21d2529cbd198d49c21b83320f9 (diff) | |
parent | 16b0723a7ce709437084c12647e59b3a73479ddf (diff) | |
download | gitlab-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.rb | 9 | ||||
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 2 |
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 |