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 Panel: move log panel options and add sort order #920

Merged

Conversation

gtk-grafana
Copy link
Contributor

@gtk-grafana gtk-grafana commented Nov 25, 2024

Moving Log panel options to the panel header, and adding logs direction:
image

WARNING: Breaking change for existing log wrap setting in local storage!

sortOrder: (logsSortOrderFromLocalStorage
? logsSortOrderFromLocalStorage
: LogsSortOrder.Descending) as LogsSortOrder,
wrapLogMessage: Boolean(getLogOption('wrapLogMessage')),
Copy link
Contributor Author

@gtk-grafana gtk-grafana Nov 25, 2024

Choose a reason for hiding this comment

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

This is the breaking change for line wrap (renaming wrapLInes -> wrapLogMessage), not really necessary, but it's nice to have the options here consistent with the types in the panel.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine to do.

@gtk-grafana gtk-grafana marked this pull request as ready for review November 26, 2024 14:10
@gtk-grafana gtk-grafana requested a review from a team as a code owner November 26, 2024 14:10
@gtk-grafana gtk-grafana changed the title Feat: move log panel options and add sort order Logs Panel: move log panel options and add sort order Nov 26, 2024
Copy link
Contributor

@svennergr svennergr left a comment

Choose a reason for hiding this comment

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

Left a few comments, especially the sorting on page refresh needs a fix, but I really like the UX of it and using the RadioGroups for all options is really slick.

src/Components/ServiceScene/LogOptionsScene.tsx Outdated Show resolved Hide resolved
sortOrder: (logsSortOrderFromLocalStorage
? logsSortOrderFromLocalStorage
: LogsSortOrder.Descending) as LogsSortOrder,
wrapLogMessage: Boolean(getLogOption('wrapLogMessage')),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine to do.

tests/exploreServicesBreakDown.spec.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@svennergr svennergr left a comment

Choose a reason for hiding this comment

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

🚀 🚀 🚀

I think this scrolling behavior is an issue with the logspanel itself, but worth calling out:

Screen.Recording.2024-11-26.at.17.22.33.mov

@gtk-grafana gtk-grafana added this to the 1.0.5 milestone Nov 26, 2024
@gtk-grafana gtk-grafana added the enhancement New feature or request label Nov 26, 2024
@gtk-grafana gtk-grafana self-assigned this Nov 26, 2024
@gtk-grafana
Copy link
Contributor Author

@svennergr yeah the panel tries to keep the same lines in the viewport for better or for worse. It's probably more annoying in a QA context then in a real life situation

@gtk-grafana gtk-grafana merged commit b1d0c26 into main Nov 26, 2024
4 checks passed
@svennergr
Copy link
Contributor

@svennergr yeah the panel tries to keep the same lines in the viewport for better or for worse. It's probably more annoying in a QA context then in a real life situation

That's not the case in core Explore though, so somewhere is a disconnect, I think.

@gtk-grafana
Copy link
Contributor Author

oh, I didn't realize that! @matyax is this a bug in Explore, or Explore logs?

@matyax matyax deleted the gtk-grafana/issues/916/move-actions-into-panel-headers branch November 26, 2024 16:37
@matyax
Copy link
Contributor

matyax commented Nov 26, 2024

I think this is the first time I see this behavior in the logs panel. Probably within LogsPanel or something about Scenes.

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

Successfully merging this pull request may close these issues.

3 participants