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

Keeping query context while changing query types #81

Open
fmassot opened this issue Feb 19, 2024 · 1 comment
Open

Keeping query context while changing query types #81

fmassot opened this issue Feb 19, 2024 · 1 comment

Comments

@fmassot
Copy link
Contributor

fmassot commented Feb 19, 2024

Example to reproduce the lost of query context:

  1. Enter a metrics query (term or date histogram)
  2. Execute it
  3. Change logs query
  4. Go back to metrics query: you lost your previous query.

It would be nice to keep the metrics query context.

@fmassot fmassot changed the title Changing query type loses the query context Keeping query context while changing query types Feb 19, 2024
@ddelemeny
Copy link
Collaborator

This probably requires some degree of rewriting the state management in QueryEditor.

At the moment we use a stateless reducer that delegates the state management to grafana through mutations of the query. If we want to keep some sidecar state outside of the active query, we should introduce some local state management.

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

No branches or pull requests

2 participants