holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.79k stars 518 forks source link

Support flexible time range selector #5577

Open cdeil opened 1 year ago

cdeil commented 1 year ago

We would like to make Panel apps that have a flexible time range selector like Grafana

It has many nice features (e.g. timezones, flexible string parsing), but the key feature we use is that it supports relative time ranges like (now - 3h, now) and then shows dashboards that update at a frequency the user wants to show the latest data from the past 3 hours.

Looking at https://panel.holoviz.org/reference/index.html#widgets I see several time range widgets already, but none as nice as the Grafana one or one that supports relative ranges.

Two questions:

  1. Would such a widget be in scope for Panel?
  2. Is there any chance to wrap and re-use Grafana components in Panel apps?
philippjfr commented 1 year ago

Would such a widget be in scope for Panel?

Definitely.

Is there any chance to wrap and re-use Grafana components in Panel apps?

Is there an implementation we could look at somewhere?

cdeil commented 1 year ago

Grafana is open source and with React frontend and here: https://github.com/grafana/grafana

However I'm not sure if it's possible or advisable to wrap and re-use any components, they might be too tightly coupled to the Grafana server backend (Go language).

I guess with Python anything is possible, but maybe not a good idea, I simply don't know.