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
16f0516f
Commit
16f0516f
authored
Feb 16, 2021
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return active times in HH:MM format
parent
aeea7a72
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
ee/app/graphql/types/incident_management/oncall_rotation_active_period_type.rb
...incident_management/oncall_rotation_active_period_type.rb
+10
-4
ee/app/models/incident_management/oncall_rotation.rb
ee/app/models/incident_management/oncall_rotation.rb
+0
-2
No files found.
ee/app/graphql/types/incident_management/oncall_rotation_active_period_type.rb
View file @
16f0516f
...
...
@@ -9,13 +9,19 @@ module Types
field
:from
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'The start of the rotation interval.'
,
method: :start_time
description:
'The start of the rotation interval.'
field
:to
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'The end of the rotation interval.'
,
method: :end_time
description:
'The end of the rotation interval.'
def
from
object
.
start_time
&
.
strftime
(
'%H:%M'
)
end
def
to
object
.
end_time
&
.
strftime
(
'%H:%M'
)
end
end
# rubocop: enable Graphql/AuthorizeTypes
end
...
...
ee/app/models/incident_management/oncall_rotation.rb
View file @
16f0516f
...
...
@@ -2,8 +2,6 @@
module
IncidentManagement
class
OncallRotation
<
ApplicationRecord
include
Gitlab
::
Utils
::
StrongMemoize
ActivePeriod
=
Struct
.
new
(
:start_time
,
:end_time
)
do
def
present?
start_time
&&
end_time
...
...
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