Commit aa65aa75 authored by Toon Claes's avatar Toon Claes

Add some extra fields to Geo API node and status

- Add current attribute to GeoNode entity
- Add missing_oauth_application to GeoNodeStatus entity

Related to gitlab-org/gitlab-ee#4268
parent 6f999fc5
---
title: Add some extra fields to Geo API node and status
merge_request: 3858
author:
type: added
......@@ -22,6 +22,7 @@ Example response:
"url": "https://primary.example.com/",
"primary": true,
"enabled": true,
"current": true,
"files_max_capacity": 10,
"repos_max_capacity": 25,
"clone_protocol": "http"
......@@ -31,6 +32,7 @@ Example response:
"url": "https://secondary.example.com/",
"primary": false,
"enabled": true,
"current": false,
"files_max_capacity": 10,
"repos_max_capacity": 25,
"clone_protocol": "http"
......@@ -56,6 +58,7 @@ Example response:
"url": "https://primary.example.com/",
"primary": true,
"enabled": true,
"current": true,
"files_max_capacity": 10,
"repos_max_capacity": 25,
"clone_protocol": "http"
......@@ -80,6 +83,8 @@ Example response:
"geo_node_id": 2,
"healthy": true,
"health": "Healthy",
"health_status": "Healthy",
"missing_oauth_application": false,
"attachments_count": 1,
"attachments_synced_count": 1,
"attachments_failed_count": 0,
......@@ -125,6 +130,8 @@ Example response:
"geo_node_id": 2,
"healthy": true,
"health": "Healthy",
"health_status": "Healthy",
"missing_oauth_application": false,
"attachments_count": 1,
"attachments_synced_count": 1,
"attachments_failed_count": 0,
......
......@@ -8,6 +8,7 @@ class GeoNodeStatusEntity < Grape::Entity
node.healthy? ? 'Healthy' : node.health
end
expose :health_status
expose :missing_oauth_application, as: :missing_oauth_application
expose :attachments_count
expose :attachments_synced_count
......@@ -64,6 +65,10 @@ class GeoNodeStatusEntity < Grape::Entity
object.geo_node.namespaces
end
def missing_oauth_application
object.geo_node.missing_oauth_application?
end
def version
Gitlab::VERSION
end
......
......@@ -1106,6 +1106,7 @@ module API
expose :url
expose :primary?, as: :primary
expose :enabled
expose :current?, as: :current
expose :files_max_capacity
expose :repos_max_capacity
......
......@@ -5,6 +5,7 @@
"url",
"primary",
"enabled",
"current",
"files_max_capacity",
"repos_max_capacity",
"clone_protocol"
......@@ -14,6 +15,7 @@
"url": { "type": ["string", "null"] },
"primary": { "type": "boolean" },
"enabled": { "type": "boolean" },
"current": { "type": "boolean" },
"files_max_capacity": { "type": "integer" },
"repos_max_capacity": { "type": "integer" },
"clone_protocol": { "type": ["string"] }
......
......@@ -5,6 +5,7 @@
"healthy",
"health",
"health_status",
"missing_oauth_application",
"attachments_count",
"attachments_failed_count",
"attachments_synced_count",
......@@ -35,6 +36,7 @@
"healthy": { "type": "boolean" },
"health": { "type": ["string", "null"] },
"health_status": { "type": "string" },
"missing_oauth_application": { "type": "boolean" },
"attachments_count": { "type": "integer" },
"attachments_failed_count": { "type": "integer" },
"attachments_synced_count": { "type": "integer" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment