Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
16b0723a
Commit
16b0723a
authored
Aug 30, 2016
by
Chris Wright
Committed by
Rémy Coutable
Nov 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the Gitlab Workhorse HTTP header in the admin dashboard
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
ce03eba5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
app/helpers/components_helper.rb
app/helpers/components_helper.rb
+9
-0
app/views/admin/dashboard/index.html.haml
app/views/admin/dashboard/index.html.haml
+1
-1
changelogs/unreleased/21664-incorrect-workhorse-version-number-displayed.yml
...ed/21664-incorrect-workhorse-version-number-displayed.yml
+4
-0
spec/helpers/components_helper_spec.rb
spec/helpers/components_helper_spec.rb
+21
-0
No files found.
app/helpers/components_helper.rb
0 → 100644
View file @
16b0723a
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
app/views/admin/dashboard/index.html.haml
View file @
16b0723a
...
...
@@ -87,7 +87,7 @@
%p
GitLab Workhorse
%span
.pull-right
=
Gitlab
::
Workhorse
.
version
=
gitlab_workhorse_
version
%p
GitLab API
%span
.pull-right
...
...
changelogs/unreleased/21664-incorrect-workhorse-version-number-displayed.yml
0 → 100644
View file @
16b0723a
---
title
:
Use the Gitlab Workhorse HTTP header in the admin dashboard
merge_request
:
author
:
Chris Wright
spec/helpers/components_helper_spec.rb
0 → 100644
View file @
16b0723a
require
'spec_helper'
describe
ComponentsHelper
do
describe
'#gitlab_workhorse_version'
do
context
'without a Gitlab-Workhorse header'
do
it
'shows the version from Gitlab::Workhorse.version'
do
expect
(
helper
.
gitlab_workhorse_version
).
to
eq
Gitlab
::
Workhorse
.
version
end
end
context
'with a Gitlab-Workhorse header'
do
before
do
helper
.
request
.
headers
[
'Gitlab-Workhorse'
]
=
'42.42.0-rc3'
end
it
'shows the actual GitLab Workhorse version currently in use'
do
expect
(
helper
.
gitlab_workhorse_version
).
to
eq
'42.42.0'
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment