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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
04147857
Commit
04147857
authored
Apr 06, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing attributes to Entity::GeoNodeStatus
parent
d547754e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
lib/api/entities.rb
lib/api/entities.rb
+4
-0
lib/api/geo.rb
lib/api/geo.rb
+1
-1
spec/fixtures/api/schemas/geo_node_status.json
spec/fixtures/api/schemas/geo_node_status.json
+3
-3
spec/requests/api/geo_spec.rb
spec/requests/api/geo_spec.rb
+1
-1
No files found.
lib/api/entities.rb
View file @
04147857
...
...
@@ -779,12 +779,16 @@ module API
end
class
GeoNodeStatus
<
Grape
::
Entity
expose
:id
expose
:health
expose
:healthy?
,
as: :healthy
expose
:repositories_count
expose
:repositories_synced_count
expose
:repositories_failed_count
expose
:lfs_objects_count
expose
:lfs_objects_synced_count
expose
:attachments_count
expose
:attachments_synced_count
end
class
PersonalAccessToken
<
Grape
::
Entity
...
...
lib/api/geo.rb
View file @
04147857
...
...
@@ -37,7 +37,7 @@ module API
require_node_to_be_secondary!
require_node_to_have_tracking_db!
present
GeoNodeStatus
.
new
,
with:
Entities
::
GeoNodeStatus
present
GeoNodeStatus
.
new
(
id:
Gitlab
::
Geo
.
current_node
.
id
)
,
with:
Entities
::
GeoNodeStatus
end
# Enqueue a batch of IDs of wiki's projects to have their
...
...
spec/fixtures/api/schemas/geo_node_status.json
View file @
04147857
...
...
@@ -4,13 +4,13 @@
"id"
,
"healthy"
,
"health"
,
"attachments_count"
,
"attachments_synced_count"
,
"lfs_objects_count"
,
"lfs_objects_synced_count"
,
"lfs_objects_synced_in_percentage"
,
"repositories_count"
,
"repositories_failed_count"
,
"repositories_synced_count"
,
"repositories_synced_in_percentage"
"repositories_synced_count"
],
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
...
...
spec/requests/api/geo_spec.rb
View file @
04147857
...
...
@@ -293,7 +293,7 @@ describe API::Geo, api: true do
get
api
(
'/geo/status'
),
nil
,
request
.
headers
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
.
headers
[
'Content-Type'
]).
to
eq
(
'application/json
'
)
expect
(
response
).
to
match_response_schema
(
'geo_node_status
'
)
end
it
'responds with a 404 when the tracking database is disabled'
do
...
...
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