grafana / explore-logs

Repo for the Loki log exploration app
GNU Affero General Public License v3.0
308 stars 14 forks source link

Config: Administrator config - max interval #843

Closed gtk-grafana closed 2 weeks ago

gtk-grafana commented 1 month ago

Allow admins to optionally set a global maximum interval for Explore Logs.

Fixes: https://github.com/grafana/explore-logs/issues/842

image image

On changing time range to something with longer interval then maximum set in config:

image
gtk-grafana commented 3 weeks ago

@JStickler the copy is still a bit clumsy: can you review when you have some time?

Input description copy:

  The maximum interval that can be selected in the time picker within the Explore Logs app. If empty users
              can select any time range interval in Explore Logs. <br />
              Example values: 7d, 24h, 2w

Toast copy:

Time range interval exceeds maximum interval configured by the administrator.
matyax commented 3 weeks ago

Can we display an error when it's not valid?

imagen

Similar to the date picker.

imagen

This also relates with the improvements after the upgrade of the data source configuration pages, where a huge part of the debt was due to missing error states or messages.

gtk-grafana commented 3 weeks ago

@matyax thank you for the excellent review, and good call on the error message:

image