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

[Frontend] Fix cannot copy logs in LogViewer when scrolling #2370

Merged
merged 6 commits into from
Oct 12, 2019

Conversation

Bobgy
Copy link
Contributor

@Bobgy Bobgy commented Oct 11, 2019

Changes:

  • LogViewer render 1000 400 lines of extra logs above and below visible part now. (so we can select more logs)
  • LogViewer only follows new logs when it is already scrolled to the bottom.

Fixes #1508
DEMO: https://drive.google.com/file/d/1jTg0mztuT0_Vq2lkRlQnjS0i8PEP3vdo/view

Ask for review about the solution. When it sounds good, I will add tests and tidy up code.

/area front-end
/kind bug


This change is Reviewable

@Bobgy Bobgy changed the title [Frontend] Fix cannot copy logs in LogViewer when scrolling [WIP] [Frontend] Fix cannot copy logs in LogViewer when scrolling Oct 11, 2019
@Bobgy
Copy link
Contributor Author

Bobgy commented Oct 12, 2019

Didn't add related tests for this, because our test infra doesn't run tests in a real browser. Features added here cannot be tested in js dom simulated environment.

@Bobgy Bobgy changed the title [WIP] [Frontend] Fix cannot copy logs in LogViewer when scrolling [Frontend] Fix cannot copy logs in LogViewer when scrolling Oct 12, 2019
@Bobgy
Copy link
Contributor Author

Bobgy commented Oct 12, 2019

@jingzhang36 Can you help me review?

@jingzhang36
Copy link
Contributor

/lgtm

…; Changed snapshots to mount + getDOMNode to be invariant to internal refactoring
@Bobgy
Copy link
Contributor Author

Bobgy commented Oct 12, 2019

@jingzhang36 I updated to fix snapshot tests. Can you relgtm again?

@jingzhang36
Copy link
Contributor

/lgtm

@Bobgy
Copy link
Contributor Author

Bobgy commented Oct 12, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobgy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

Logs are effectively impossible to copy when the log window has scroll-bar
3 participants