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
27eea3a5
Commit
27eea3a5
authored
Mar 11, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add links to incident with details path
parent
b0e53a2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
ee/app/serializers/status_page/incident_entity.rb
ee/app/serializers/status_page/incident_entity.rb
+5
-0
ee/spec/fixtures/api/schemas/status_page/basic_incident.json
ee/spec/fixtures/api/schemas/status_page/basic_incident.json
+8
-0
No files found.
ee/app/serializers/status_page/incident_entity.rb
View file @
27eea3a5
...
...
@@ -9,9 +9,14 @@ module StatusPage
expose
:updated_at
expose
:created_at
expose
:user_notes
,
as: :comments
,
using:
IncidentCommentEntity
expose
:links
private
def
links
{
details:
StatusPage
::
Storage
.
details_path
(
object
.
iid
)
}
end
def
user_notes
Array
(
options
[
:user_notes
])
end
...
...
ee/spec/fixtures/api/schemas/status_page/basic_incident.json
View file @
27eea3a5
...
...
@@ -5,6 +5,7 @@
"state"
,
"title"
,
"description"
,
"links"
,
"updated_at"
,
"created_at"
],
...
...
@@ -16,6 +17,13 @@
},
"title"
:
{
"type"
:
"string"
},
"description"
:
{
"type"
:
"string"
},
"links"
:
{
"type"
:
"object"
,
"properties"
:
{
"details"
:
{
"type"
:
"string"
}
},
"additionalProperties"
:
false
},
"updated_at"
:
{
"type"
:
"date"
},
"created_at"
:
{
"type"
:
"date"
}
}
...
...
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