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
d63b5bf1
Commit
d63b5bf1
authored
Jan 30, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
a5633c9e
cb76f79d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
app/serializers/cluster_application_entity.rb
app/serializers/cluster_application_entity.rb
+1
-0
changelogs/unreleased/cluster_status_for_ugprading.yml
changelogs/unreleased/cluster_status_for_ugprading.yml
+5
-0
spec/fixtures/api/schemas/cluster_status.json
spec/fixtures/api/schemas/cluster_status.json
+1
-0
spec/serializers/cluster_application_entity_spec.rb
spec/serializers/cluster_application_entity_spec.rb
+5
-1
No files found.
app/serializers/cluster_application_entity.rb
View file @
d63b5bf1
...
@@ -4,6 +4,7 @@ class ClusterApplicationEntity < Grape::Entity
...
@@ -4,6 +4,7 @@ class ClusterApplicationEntity < Grape::Entity
expose
:name
expose
:name
expose
:status_name
,
as: :status
expose
:status_name
,
as: :status
expose
:status_reason
expose
:status_reason
expose
:version
expose
:external_ip
,
if:
->
(
e
,
_
)
{
e
.
respond_to?
(
:external_ip
)
}
expose
:external_ip
,
if:
->
(
e
,
_
)
{
e
.
respond_to?
(
:external_ip
)
}
expose
:hostname
,
if:
->
(
e
,
_
)
{
e
.
respond_to?
(
:hostname
)
}
expose
:hostname
,
if:
->
(
e
,
_
)
{
e
.
respond_to?
(
:hostname
)
}
expose
:email
,
if:
->
(
e
,
_
)
{
e
.
respond_to?
(
:email
)
}
expose
:email
,
if:
->
(
e
,
_
)
{
e
.
respond_to?
(
:email
)
}
...
...
changelogs/unreleased/cluster_status_for_ugprading.yml
0 → 100644
View file @
d63b5bf1
---
title
:
Expose version for each application in cluster_status JSON endpoint
merge_request
:
24791
author
:
type
:
other
spec/fixtures/api/schemas/cluster_status.json
View file @
d63b5bf1
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
]
]
}
}
},
},
"version"
:
{
"type"
:
"string"
},
"status_reason"
:
{
"type"
:
[
"string"
,
"null"
]
},
"status_reason"
:
{
"type"
:
[
"string"
,
"null"
]
},
"external_ip"
:
{
"type"
:
[
"string"
,
"null"
]
},
"external_ip"
:
{
"type"
:
[
"string"
,
"null"
]
},
"hostname"
:
{
"type"
:
[
"string"
,
"null"
]
},
"hostname"
:
{
"type"
:
[
"string"
,
"null"
]
},
...
...
spec/serializers/cluster_application_entity_spec.rb
View file @
d63b5bf1
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
ClusterApplicationEntity
do
describe
ClusterApplicationEntity
do
describe
'#as_json'
do
describe
'#as_json'
do
let
(
:application
)
{
build
(
:clusters_applications_helm
)
}
let
(
:application
)
{
build
(
:clusters_applications_helm
,
version:
'0.1.1'
)
}
subject
{
described_class
.
new
(
application
).
as_json
}
subject
{
described_class
.
new
(
application
).
as_json
}
it
'has name'
do
it
'has name'
do
...
@@ -13,6 +13,10 @@ describe ClusterApplicationEntity do
...
@@ -13,6 +13,10 @@ describe ClusterApplicationEntity do
expect
(
subject
[
:status
]).
to
eq
(
:not_installable
)
expect
(
subject
[
:status
]).
to
eq
(
:not_installable
)
end
end
it
'has version'
do
expect
(
subject
[
:version
]).
to
eq
(
'0.1.1'
)
end
it
'has no status_reason'
do
it
'has no status_reason'
do
expect
(
subject
[
:status_reason
]).
to
be_nil
expect
(
subject
[
:status_reason
]).
to
be_nil
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