-
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
[SIEM] update url state between page if date is relative #56813
Conversation
Pinging @elastic/siem (Team:SIEM) |
49b858f
to
dbcb1b6
Compare
@@ -24,13 +24,12 @@ import { | |||
UpdateUrlStateString, | |||
} from './types'; | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |||
export const decodeRisonUrlState = (value: string | undefined): RisonValue | any | undefined => { | |||
export const decodeRisonUrlState = <T>(value: string | undefined): T | null => { |
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.
nice refactor!
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.
LGTM
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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.
Checked out locally and tested thoroughly. Relative datetimes are updating when navigating from Edit Rules
-> Main Detection Engine
(via main nav), and absolute datetimes do not update (as expected).
Note: As discussed, a lot of the Detection Engine links are not including the url state, so this won't work for those. Feel free to fix as part of this or a follow-up.
Great fix and improvements + tests too! Thanks @XavierM! 🎉 🙂
544838a
to
b74f25e
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* update url state between page if needed it like time range * fix round up for to * simplify type * leftover cleanup * we forget to update relative date when loading the page by a refresh * pair with Garrett to make a minimal impact on the ux * fix detetections tabs
* update url state between page if needed it like time range * fix round up for to * simplify type * leftover cleanup * we forget to update relative date when loading the page by a refresh * pair with Garrett to make a minimal impact on the ux * fix detetections tabs
…7074) * update url state between page if needed it like time range * fix round up for to * simplify type * leftover cleanup * we forget to update relative date when loading the page by a refresh * pair with Garrett to make a minimal impact on the ux * fix detetections tabs
…b.com:jloleysens/kibana into console/feature/text-objects-in-saved-objects * 'console/feature/text-objects-in-saved-objects' of github.com:jloleysens/kibana: (103 commits) fix auto closing new vis modal when navigating to lens or when navigating away with browser history (elastic#56998) TS of esKuery\node_types (elastic#56857) Kibana app migration: Move static code dependencies into kibana_legacy plugin, part 1 (elastic#56408) Retry ES API calls that fail with 410/Gone (elastic#56950) [APM] Show missing permissions message to the user on the Services overview (elastic#56374) Fixing flaky CI tests for custom appRoutes (elastic#55763) [State Management][Docs] State syncing utils docs (elastic#56479) [Index management] Remove index mapper setting in tests (elastic#57066) Exposed common EuiExpressions to separate components be able to reuse for building new for Alert Types (elastic#56466) [SIEM] update url state between page if date is relative (elastic#56813) fix for chart_types test (elastic#57056) chore(NA): remove compress from dll minimizer (elastic#57023) [File upload] Migrate routing to NP & add route validation (elastic#52313) Adding docs for grouped nav advanced setting (elastic#57013) Use i18n titles for field formatters, human names for numeral locales (elastic#56348) [Maps] Remove EMS catalogue url from docs (elastic#57020) [Endpoint] ERT-82 ERT-83 ERT-84: Alert list API with pagination (elastic#56538) [DOCS] Adds Apple notarization info to install doc (elastic#57042) [ML] New Platform server shim: update results service routes to use new platform router (elastic#56886) Fix typo on detection engine rule (elastic#56993) ...
…7072) * update url state between page if needed it like time range * fix round up for to * simplify type * leftover cleanup * we forget to update relative date when loading the page by a refresh * pair with Garrett to make a minimal impact on the ux * fix detetections tabs Co-authored-by: Elastic Machine <[email protected]>
Summary
Update date picker when switching page between the siem app if the date is relative.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately