Skip to content
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

Merged
merged 10 commits into from
Feb 7, 2020

Conversation

XavierM
Copy link
Contributor

@XavierM XavierM commented Feb 4, 2020

Summary

Update date picker when switching page between the siem app if the date is relative.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@XavierM XavierM added bug Fixes for quality problems that affect the customer experience Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v7.6.1 labels Feb 4, 2020
@XavierM XavierM self-assigned this Feb 4, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@XavierM XavierM changed the title [SIEM} update url state between page if date is relative [SIEM] update url state between page if date is relative Feb 5, 2020
@XavierM XavierM force-pushed the siem-keep-relative-date-real branch from 49b858f to dbcb1b6 Compare February 5, 2020 03:45
@@ -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 => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice refactor!

Copy link
Contributor

@dhurley14 dhurley14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@elastic elastic deleted a comment from kibanamachine Feb 6, 2020
Copy link
Member

@spong spong left a 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! 🎉 🙂

@XavierM XavierM force-pushed the siem-keep-relative-date-real branch from 544838a to b74f25e Compare February 7, 2020 00:29
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@XavierM XavierM merged commit cbdd5be into elastic:master Feb 7, 2020
XavierM added a commit to XavierM/kibana that referenced this pull request Feb 7, 2020
* 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
XavierM added a commit to XavierM/kibana that referenced this pull request Feb 7, 2020
* 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
XavierM added a commit that referenced this pull request Feb 7, 2020
…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
jloleysens added a commit to jloleysens/kibana that referenced this pull request Feb 7, 2020
…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)
  ...
XavierM added a commit that referenced this pull request Feb 7, 2020
…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]>
@XavierM XavierM deleted the siem-keep-relative-date-real branch June 4, 2020 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.6.1 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants