Add Url state parameter for external alerts checkbox#142344
Merged
machadoum merged 5 commits intoelastic:mainfrom Oct 4, 2022
Merged
Add Url state parameter for external alerts checkbox#142344machadoum merged 5 commits intoelastic:mainfrom
machadoum merged 5 commits intoelastic:mainfrom
Conversation
a3598b5 to
4de1647
Compare
Contributor
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
4de1647 to
bcbebc1
Compare
Member
Author
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @machadoum |
jamster10
reviewed
Oct 3, 2022
| const getInitialUrlParamValue = useGetInitialUrlParamValue<boolean>(EXTERNAL_ALERTS_URL_PARAM); | ||
|
|
||
| const { decodedParam: showExternalAlertsInitialUrlState } = useMemo( | ||
| () => getInitialUrlParamValue(), |
Contributor
There was a problem hiding this comment.
Made me curious, and not important, but do you know if destructuring allocates memory for the intermediary object the value gets pulled out of?
Would:
const showExternalAlertsInitialUrlState = useMemo(() => getInitialUrlParamState().decodedParam, [•••])
Cause an improvement to memory or memorization? Not that it would make much of a difference here?
jamster10
approved these changes
Oct 3, 2022
WafaaNasr
pushed a commit
to WafaaNasr/kibana
that referenced
this pull request
Oct 11, 2022
* Refactor global_query_string to move reusabel code to helper * Add Url state parameter for external alerts checkbox Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
WafaaNasr
pushed a commit
to WafaaNasr/kibana
that referenced
this pull request
Oct 14, 2022
* Refactor global_query_string to move reusabel code to helper * Add Url state parameter for external alerts checkbox Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
issue #137436
Summary
Add Url state parameter for external alerts checkbox only when the user is on the page, when the user navigates to another page the URL param is removed from the query string.
*** The implementation doesn't use
global_query_stringbecause external alerts URL param isn't global.Extra:
global_query_stringby extracting reusable code to a helper fileChecklist
Delete any items that are not applicable to this PR.