BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
10d9df28
Commit
10d9df28
authored
Jul 18, 2016
by
Katarzyna Kobierska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gitlab-workhorse version to admin dashboard
Test for showing GitLab Workhorse version on Admin Dashboard Refactoring
parent
46a17ffd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
CHANGELOG
CHANGELOG
+1
-0
index.html.haml
app/views/admin/dashboard/index.html.haml
+4
-0
workhorse.rb
lib/gitlab/workhorse.rb
+7
-0
index.html.haml_spec.rb
spec/views/admin/dashboard/index.html.haml_spec.rb
+20
-0
No files found.
CHANGELOG
View file @
10d9df28
...
...
@@ -164,6 +164,7 @@ v 8.10.0
- Export and import avatar as part of project import/export
- Fix migration corrupting import data for old version upgrades
- Show tooltip on GitLab export link in new project page
- Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska)
v 8.9.6
- Fix importing of events under notes for GitLab projects. !5154
...
...
app/views/admin/dashboard/index.html.haml
View file @
10d9df28
...
...
@@ -80,6 +80,10 @@
%span
.pull-right
=
Gitlab
::
Shell
.
new
.
version
%p
GitLab Workhorse
%span
.pull-right
=
Gitlab
::
Workhorse
.
version
%p
GitLab API
%span
.pull-right
=
API
::
API
::
version
...
...
lib/gitlab/workhorse.rb
View file @
10d9df28
...
...
@@ -4,6 +4,7 @@ require 'json'
module
Gitlab
class
Workhorse
SEND_DATA_HEADER
=
'Gitlab-Workhorse-Send-Data'
VERSION_FILE
=
'GITLAB_WORKHORSE_VERSION'
class
<<
self
def
git_http_ok
(
repository
,
user
)
...
...
@@ -75,6 +76,12 @@ module Gitlab
]
end
def
version
if
File
.
readable?
(
File
.
join
(
Rails
.
root
,
VERSION_FILE
))
File
.
read
(
File
.
join
(
Rails
.
root
,
VERSION_FILE
))
end
end
protected
def
encode
(
hash
)
...
...
spec/views/admin/dashboard/index.html.haml_spec.rb
0 → 100644
View file @
10d9df28
require
'spec_helper'
describe
'admin/dashboard/index.html.haml'
do
include
Devise
::
TestHelpers
before
do
assign
(
:projects
,
create_list
(
:empty_project
,
1
))
assign
(
:users
,
create_list
(
:user
,
1
))
assign
(
:groups
,
create_list
(
:group
,
1
))
allow
(
view
).
to
receive
(
:admin?
).
and_return
(
true
)
end
it
"shows version of GitLab Workhorse"
do
render
expect
(
rendered
).
to
have_content
'GitLab Workhorse'
expect
(
rendered
).
to
have_content
Gitlab
::
Workhorse
.
version
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