-
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
[Monitoring] Fix broken scrubbing on monitoring charts #47382
[Monitoring] Fix broken scrubbing on monitoring charts #47382
Conversation
Pinging @elastic/stack-monitoring (Team:Monitoring) |
💔 Build Failed |
@elasticmachine merge upstream |
💚 Build Succeeded |
@@ -152,9 +168,11 @@ export class MonitoringViewBaseController { | |||
this.onBrush = ({ xaxis }) => { | |||
removePopstateHandler(); | |||
const { to, from } = xaxis; | |||
const timezone = config.get('dateFormat:tz'); | |||
const offset = getOffsetInMS(timezone); |
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.
More of nitpick, but I think timezone
and offset
can be calculated just once in the constructor, unless config.get
always gets the latest/updated value
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.
Works as expected. You're on 🔥 Great job!!!
* Apply an offset on brush * Fix test
* Apply an offset on brush * Fix test
elastic#47585) * Apply an offset on brush * Fix test
Resolves #47380
This PR applies an offset to the updated
to
andfrom
UTC timestamps received from theonBrush
callback to account for the recently applied offset on the server.While working on this, I realized this bug seems to affect brushing too.