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

Wrap pod logs #6217

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open

Wrap pod logs #6217

wants to merge 77 commits into from

Conversation

aleksfront
Copy link
Contributor

Adding a way to wrap log lines for better logs readability.

wrap logs example

This made possible by replacing react-window virtualisation library to tanstack/virtual (https://github.com/tanstack/virtual) which supports undetermined height rows.

wrapping.logs.mov

Fixes #1077

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
Signed-off-by: alexfront <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
@jim-docker
Copy link
Contributor

jim-docker commented Dec 6, 2022

Should the highlighted search selection stay in view when toggling wrapped?

Screen.Recording.2022-12-05.at.6.38.21.PM.mov

Also, when at the very bottom of the logs with Wrap logs checked, unchecking then rechecking leaves the view not at the bottom of the logs.

@@ -29,6 +29,17 @@ import showErrorNotificationInjectable from "../../renderer/components/notificat
import type { DiContainer } from "@ogre-tools/injectable";
import type { Container } from "../../common/k8s-api/endpoints";

const observe = jest.fn();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: set it inline below?

userEvent.click(await screen.findByPlaceholderText("Search..."));
userEvent.keyboard("o");
userEvent.click(await screen.findByText("keyboard_arrow_up"));
expect(scrollToOverlay).toBeCalled();
expect(setPrevOverlayActiveMock).toHaveBeenCalled();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
expect(setPrevOverlayActiveMock).toHaveBeenCalled();
expect(setPrevOverlayActiveMock).toBeCalled();

*/
import { useState } from "react";

export function useJumpToBottomButton(scrolledParent: HTMLDivElement | null): [isVisible: boolean, setVisibility: () => void] {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
export function useJumpToBottomButton(scrolledParent: HTMLDivElement | null): [isVisible: boolean, setVisibility: () => void] {
export function useScrollToBottomButton(scrolledParent: HTMLDivElement | null): [isVisible: boolean, setVisibility: () => void] {

or change file name?

@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@kitsirota
Copy link

@aleksfront Thanks for working on this! I cant wait to see this get merged and shipped. Even on a 4k screen, scrolling horizontally just to get the details you need is a massive pain.

@Nokel81 Nokel81 modified the milestones: 6.3.0, 6.4.0 Dec 21, 2022
@matter-it-does
Copy link

thanks for working on this

@haunt98
Copy link

haunt98 commented Jan 4, 2023

Thanks for working on this man 👍

@Nokel81 Nokel81 modified the milestones: 6.4.0, 6.5.0 Jan 26, 2023
@amit-mahendrakar
Copy link

Thanks @aleksfront , it is a much needed feature.

@kitsirota
Copy link

@aleksfront or @Nokel81 could one of you rebase this so it can get merged? Its a badly needed feature at this point and it would be great to finally see it in the 6.5.0 release

@bitroniq
Copy link

Please help on this feature, highly requested

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

Successfully merging this pull request may close these issues.

Wrap logs
10 participants