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

Logs: Issue queries in forward or backward direction depending on the selected sorting option #970

Merged
merged 5 commits into from
Jan 7, 2025

Conversation

matyax
Copy link
Contributor

@matyax matyax commented Dec 19, 2024

Sibling of grafana/grafana#98203
Related with grafana/grafana#91904

This adds direction to our logs queries, so they are issued in the backward direction when the sorting is "newest first", or forward direction when looking for "oldest first".

Demo.mov

@matyax matyax requested a review from a team as a code owner December 19, 2024 17:04
@matyax matyax changed the title feat(LogsPanelScene): issue queries in forward or backward direction … LogsPanelScene: Issue queries in forward or backward direction depending on the selected sorting option Dec 19, 2024
@matyax matyax changed the title LogsPanelScene: Issue queries in forward or backward direction depending on the selected sorting option Logs: Issue queries in forward or backward direction depending on the selected sorting option Dec 19, 2024
@matyax matyax requested a review from gtk-grafana January 6, 2025 09:40
@matyax matyax force-pushed the matyax/logs-sort-order branch from d7e3cb0 to fcfc371 Compare January 6, 2025 11:16
@matyax
Copy link
Contributor Author

matyax commented Jan 6, 2025

It'd be cool to have this before the new release.

@gtk-grafana
Copy link
Contributor

@matyax looks like there's a bug with infinite scroll and oldest first:

query-direction-bug-720.mov

Copy link
Contributor

@gtk-grafana gtk-grafana left a comment

Choose a reason for hiding this comment

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

Code looks good, just the infinite scroll bug and this should be good to go!

@matyax matyax force-pushed the matyax/logs-sort-order branch from a63ca29 to 228d8dc Compare January 7, 2025 09:31
@matyax
Copy link
Contributor Author

matyax commented Jan 7, 2025

The fix for infinite scrolling was sitting in another open PR, as an unrelated change. It was even hard for me to figure out where it was. I should have opened a dedicated PR for that.

A proper fix was created in grafana/grafana#98579

@matyax matyax requested a review from gtk-grafana January 7, 2025 10:29
@matyax matyax enabled auto-merge (squash) January 7, 2025 14:09
@matyax matyax merged commit 82cf1d3 into main Jan 7, 2025
4 checks passed
@matyax matyax deleted the matyax/logs-sort-order branch January 7, 2025 14:26
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.

2 participants