-
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
[Infra UI] Fix page content reload when date picker has relative dates #165462
[Infra UI] Fix page content reload when date picker has relative dates #165462
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@@ -104,7 +102,6 @@ export const LensWrapper = ({ | |||
<div | |||
css={css` | |||
position: relative; | |||
border-radius: ${euiTheme.size.s}; |
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.
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, thanks for the fix!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
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.
Good job! 🙌 The data picker reload with relative dates works as expected!
I left some small comments/suggestions
setEmbeddableLoaded(true); | ||
} | ||
}, [embeddableLoaded]); | ||
const handlOnLoad = useCallback( |
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.
Should it be?
const handlOnLoad = useCallback( | |
const handleOnLoad = useCallback( |
import { TimeRange } from '@kbn/es-query'; | ||
import { LensAttributes } from '@kbn/lens-embeddable-utils'; | ||
import { LensEmbeddableInput, TypedLensByValueInput } from '@kbn/lens-plugin/public'; |
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.
import { TimeRange } from '@kbn/es-query'; | |
import { LensAttributes } from '@kbn/lens-embeddable-utils'; | |
import { LensEmbeddableInput, TypedLensByValueInput } from '@kbn/lens-plugin/public'; | |
import type { TimeRange } from '@kbn/es-query'; | |
import type { LensAttributes } from '@kbn/lens-embeddable-utils'; | |
import type { LensEmbeddableInput, TypedLensByValueInput } from '@kbn/lens-plugin/public'; |
@@ -104,7 +102,6 @@ export const LensWrapper = ({ | |||
<div | |||
css={css` | |||
position: relative; | |||
border-radius: ${euiTheme.size.s}; |
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, thanks for the fix!
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 🚀 Thanks for the changes!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
closes #165194
Summary
This PR fixes the problem with the Asset Details not reloading its content when date-picker had relative dates.
flyout
flyout.mov
full-page
full_page.mov
I've also changed all the charts to receive absolute date ranges. If they used relative dates,
now
will be calculated when each chart starts loading, this could change significantly if there is a delay between loading each individual chart.How to test
now
and submit (do that one more time)now
and submit (do that one more time)