-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[alerts] adds support for index threshold index param string type #88540
Merged
pmuellr
merged 5 commits into
elastic:master
from
pmuellr:alerts/index-threshold-non-array-index-param
Jan 25, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2439918
[alerts] adds support for index threshold index param string type
pmuellr 2fc19f1
Merge branch 'master' into alerts/index-threshold-non-array-index-param
kibanamachine 9f95ce7
modify existing FT to handle case of string param
pmuellr 080063a
Merge branch 'master' into alerts/index-threshold-non-array-index-param
kibanamachine 0b718b5
Merge branch 'master' into alerts/index-threshold-non-array-index-param
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,7 +228,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { | |
timeWindowUnit: 'm', | ||
groupBy: 'all', | ||
threshold: [1000, 5000], | ||
index: ['.kibana_1'], | ||
index: '.kibana_1', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is already an example of testing the array version of the |
||
timeField: 'alert', | ||
}, | ||
actions: [ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this test so that we have a jest test that will test a
string
index param (instead of the usualstring[]
type). It would be good to add a function test, I think, would need to create an alert using the API (passing astring
typedindex
field), and then edit the alert and make sure the single index appears as expected in the UI. Do we have similar tests like this? Thoughts on where to add such a test?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the
esArchiver
to load an archived alert with a string index param and then try to edit it in your functional test?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to create one via the API - I suspect that will be easier to figuring out esArchiver :-)
Let me see if I can add a quick one ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one - I ended up changing the test in
x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts
, below, from using an array of indices to a single index string.