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

Time regions support in graph panel #12371

Merged
merged 10 commits into from
Nov 15, 2018
Merged

Conversation

marefr
Copy link
Member

@marefr marefr commented Jun 21, 2018

Fixes #5930

Example dashboard using Grafana Testdata datasource: https://gist.github.com/marefr/2fee183a7b566ab12c6477fccec5a887

image

image

image

image

@torkelo
Copy link
Member

torkelo commented Jun 25, 2018

I wonder how much conflict this will have with the major refactorings in https://github.com/grafana/grafana/pull/12060/files

@marefr
Copy link
Member Author

marefr commented Jun 26, 2018

Good question :) Barely no changes to the "value" thresholds in this PR so no conflicts per se with that other PR. But if we want this to be in React as well, then yes there are a lot of changes needed

@torkelo
Copy link
Member

torkelo commented Jun 26, 2018

Maybe thresholds are the wrong name for this? Been thinking about thresholds recently and how we can align the thresholds model & UI across panels. But this feels a lot different. more like Colored Time Regions or Time Markings.

@marefr
Copy link
Member Author

marefr commented Jun 29, 2018

Yes agree, but you mean thresholds in general? Colored Time Regions or Time Markings are exactly the same as Colored Value Regions or Value Markings, right?

@marefr marefr changed the title X-Axis (time) threshold support in graph panel Time region support in graph panel Aug 8, 2018
@marefr marefr changed the title Time region support in graph panel Time regions support in graph panel Aug 8, 2018
@marefr
Copy link
Member Author

marefr commented Aug 8, 2018

@torkelo did some work on this:

  • No longer combined with thresholds and moved to a separate section under Display tab
  • The whole concept/feature is now called "time regions"

@perplexityjeff
Copy link
Contributor

This is a great feature that we are looking for to be added to Grafana. Is there any update for this request at this moment?

@marefr
Copy link
Member Author

marefr commented Oct 4, 2018

@perplexityjeff hopefully it can be included in v5.4.

@StephenOTT
Copy link

Any plans to add this into other panel types such as HeatMap? thinking prometheus histogram heatmap usage as a example.

@marefr
Copy link
Member Author

marefr commented Nov 15, 2018

@StephenOTT not at the moment. That panel is using d3 so it's not that easy to implement just by copy this solution. Please open a separate issue for heatmap time regions.

Copy link
Member

@torkelo torkelo left a comment

Choose a reason for hiding this comment

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

Looks really great. Sorry for taking for every to review & test this.

I would remove the background %3 & %6 and rename background %9 with Gray. And maybe add a blue transparent color as well.

@marefr
Copy link
Member Author

marefr commented Nov 15, 2018

Replaced background color modes with Gray. Added blue color. Moved custom to bottom.

image

@marefr marefr merged commit 0810aa2 into grafana:master Nov 15, 2018
@marefr marefr deleted the xaxis_thresholds branch November 15, 2018 16:46
@marefr marefr added this to the 5.4.0-beta1 milestone Nov 15, 2018
@Gauravshah
Copy link
Contributor

Are there plans to support timezone ? if there are some directions we would love to contribute

@marefr
Copy link
Member Author

marefr commented Dec 10, 2018

@Gauravshah what do you mean? You configure times that correlates to UTC. Changing timezone of dashboard to local browser time will adjust the time regions accordingly.

@Gauravshah
Copy link
Contributor

@marefr lets say my timezone is PT ( Los Angeles ). I select Sat as my time region. It would show on my graph as Friday night 8 PM to Saturday 8 PM. Then lets say then I pick Sat 8 AM to Sun 8:AM which will correctly show as Saturday PT. But this would go off when we change DST. We would need to go back and fix all dashboards from 8 AM to 7 AM

@marefr
Copy link
Member Author

marefr commented Dec 10, 2018

I would say then use UTC time in dashboard as timezone instead or open a feature request issue.

@Gauravshah
Copy link
Contributor

@marefr I think there are valid uses cases around using time zone. Will open a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants