datalust / seq-tickets

Issues, design discussions and feature roadmap for the Seq log server
https://datalust.co/seq
97 stars 5 forks source link

Dashboard chart query Group-by-time and Limit properties not editable #2030

Closed ode2code95 closed 11 months ago

ode2code95 commented 11 months ago

Describe the bug When creating a new chart, the Group-by-time and Limit properties are not editable from the Query view.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Dashboards'
  2. Click on your dashboard.
  3. Create a new Chart
  4. Open the 'Query' tab
  5. Set where to @Timestamp >= Now() - 15d, group by to time(1d), and limit to some value other than 10,000.

Expected behavior The Time and Limit fields in the SQL query are updated.

Screenshots

image

Environment (please complete the following information):

Additional context This bug is also reproduceable when trying to save a custom query with group-by intervals and limits different from the defaults to a chart. These parts of the query are not preserved when the chart is created.

liammclennan commented 11 months ago

Hi @ode2code95

Thank you for the report.

The dashboard time range and grouping is set by the dashboards UI (top right), so it is not possible to specify a grouping in the query. Similarly, a limit would cause part of the visualization to be missing, without the user being aware.

ode2code95 commented 11 months ago

Oh I see, so it was user error. 🤦

Would you consider updating the "Query" tab inputs to disallow editing the fields that won't be used anyway?

liammclennan commented 11 months ago

Limits can be used for some, but not all, chart types, and you can group by anything other than time.

It is tricky because changing the chart type changes the type of query that is valid.

ode2code95 commented 11 months ago

Good point. For now, I'd say your explanation suffices for a resolution. This user will need to read the documentation more carefully next time.