Skip to content

Wrap pod logs#6217

Open
aleksfront wants to merge 77 commits into
masterfrom
wrap-pod-logs
Open

Wrap pod logs#6217
aleksfront wants to merge 77 commits into
masterfrom
wrap-pod-logs

Conversation

@aleksfront
Copy link
Copy Markdown
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
Copy Markdown
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.

import type { DiContainer } from "@ogre-tools/injectable";
import type { Container } from "../../common/k8s-api/endpoints";

const observe = jest.fn();
Copy link
Copy Markdown
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.keyboard("o");
userEvent.click(await screen.findByText("keyboard_arrow_up"));
expect(scrollToOverlay).toBeCalled();
expect(setPrevOverlayActiveMock).toHaveBeenCalled();
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@kitsirota
Copy link
Copy Markdown

@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
Copy Markdown

thanks for working on this

@haunt98
Copy link
Copy Markdown

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
Copy Markdown

Thanks @aleksfront , it is a much needed feature.

@kitsirota
Copy link
Copy Markdown

@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

@Nokel81 Nokel81 modified the milestones: 6.5.0, 6.6.0 May 26, 2023
@bitroniq
Copy link
Copy Markdown

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