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
b41c91a6
Commit
b41c91a6
authored
Jan 25, 2021
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add array type to alert fields extractor
parent
3e7f967a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
ee/lib/gitlab/alert_management/alert_payload_field_extractor.rb
.../gitlab/alert_management/alert_payload_field_extractor.rb
+2
-0
ee/spec/lib/gitlab/alert_management/alert_payload_field_extractor_spec.rb
...ab/alert_management/alert_payload_field_extractor_spec.rb
+4
-2
No files found.
ee/lib/gitlab/alert_management/alert_payload_field_extractor.rb
View file @
b41c91a6
...
...
@@ -56,6 +56,8 @@ module Gitlab
'string'
when
Numeric
'numeric'
when
Array
'array'
end
end
end
...
...
ee/spec/lib/gitlab/alert_management/alert_payload_field_extractor_spec.rb
View file @
b41c91a6
...
...
@@ -27,7 +27,8 @@ RSpec.describe Gitlab::AlertManagement::AlertPayloadFieldExtractor do
time:
'2020-12-09T12:34:56'
,
discarded_null:
nil
,
discarded_bool_true:
true
,
discarded_bool_false:
false
discarded_bool_false:
false
,
arr:
%w[one two three]
)
end
...
...
@@ -38,7 +39,8 @@ RSpec.describe Gitlab::AlertManagement::AlertPayloadFieldExtractor do
a_field
([
'float'
],
'Float'
,
'numeric'
),
a_field
(
%w(nested key)
,
'Key'
,
'string'
),
a_field
(
%w(nested deep key)
,
'Key'
,
'string'
),
a_field
([
'time'
],
'Time'
,
'datetime'
)
a_field
([
'time'
],
'Time'
,
'datetime'
),
a_field
([
'arr'
],
'Arr'
,
'array'
)
)
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