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

[Metrics UI] Setup commonly used time ranges in timepicker #56701

Merged
merged 7 commits into from
Feb 10, 2020

Conversation

simianhacker
Copy link
Member

@simianhacker simianhacker commented Feb 3, 2020

Summary

This PR fixes #50191 by using the timepicker:quickRanges to populate the commonlyUsedRanges argument on the EuiSuperDatePicker.

Before

Metrics Explorer

image

Metric Detail Page

image

After

Metrics Explorer

image

Metric Detail Page

image

@simianhacker simianhacker added Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Feb 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@afgomez afgomez self-requested a review February 6, 2020 09:08
Copy link
Contributor

@afgomez afgomez left a comment

Choose a reason for hiding this comment

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

The code is good. I would move the duplicated code to a shared place, especially because this is useful for me as well for the logs UI.


Edit: if you cannot think of a good place to place the shared code we can merge this now and tackle that later, when I add this to my PR.

@simianhacker
Copy link
Member Author

@afgomez I changed the function definition for useKibanaUISettings to include an override for timepicker:quickRanges so that it will use the correct types without much effort. I created a function for mapping the TimePickerQuickRanges to EuiSuperDatePickerCommonRange. This should make implementing it in Logs a ton easier.

Copy link
Contributor

@afgomez afgomez left a comment

Choose a reason for hiding this comment

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

Nice! Thanks :)

@simianhacker
Copy link
Member Author

@elasticmachine merge upstream

@simianhacker
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@simianhacker simianhacker merged commit ae78211 into elastic:master Feb 10, 2020
simianhacker added a commit to simianhacker/kibana that referenced this pull request Feb 10, 2020
…6701)

* [Metrics UI] Setup commonly used time ranges in timepicker

* Fixing tests by mocking out useKibanaUISetting

* add definition override to useKibanaUISetting for timepicker:quickRanges; reduce duplicate code for mapping quick ranges

* Fixing types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
simianhacker added a commit that referenced this pull request Feb 11, 2020
…57253)

* [Metrics UI] Setup commonly used time ranges in timepicker

* Fixing tests by mocking out useKibanaUISetting

* add definition override to useKibanaUISetting for timepicker:quickRanges; reduce duplicate code for mapping quick ranges

* Fixing types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Feb 11, 2020
* master: (34 commits)
  [Index management] Server-side NP ready (elastic#56829)
  Webhook action - make user and password secrets optional (elastic#56823)
  [DOCS] Removes reference to IRC (elastic#57245)
  [Monitoring] NP migration: Local angular module (elastic#51823)
  [SIEM] Adds ECS link to help menu (elastic#57104)
  Ensure http interceptors are shares across lifecycle methods (elastic#57150)
  [Remote clusters] Migrate server code out of legacy (elastic#56781)
  fixes render bug in alert list (elastic#57152)
  siem 7.6 updates (elastic#57169)
  Make the update alert API key API work when AAD is out of sync (elastic#56640)
  fix(NA): MaxListenersExceededWarning on getLoggerStream (elastic#57133)
  [Metrics UI] Setup commonly used time ranges in timepicker (elastic#56701)
  [Maps] set filter.meta.key to geoFieldName so query passes filterMatchesIndex when ignoreFilterIfFieldNotInIndex is true (elastic#56692)
  Create plugin mock for event log plugin (elastic#57048)
  fix ts error on master (elastic#57236)
  Don't create API key for disabled alerts when calling create API (elastic#57041)
  Fix enable and disable API to still work when AAD is out of sync (elastic#56634)
  [DOCS] Canvas embed objects (elastic#57156)
  Delete autocomplete namespace (elastic#57187)
  Security - Inject logout url (elastic#57201)
  ...
@simianhacker simianhacker deleted the issue-50191-quickRanges branch April 17, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metrics UI] Customize "commonly used" time ranges
4 participants