Dashboard: Show latest logs and/or follow feature

Created on 9 Jul 2019  路  15Comments  路  Source: tektoncd/dashboard

In the Pipeline/Task log view a large number of logs can be produced, which can become unwieldy as a user scrolls.

Would be nice from a UX perspective to either have a fixed height & scrollable window for logs that can be set to follow mode (showing latest logs as they are recieved), or a tick-box to show latest logs first.

Additionally, it might be worth investigating an optimised mechanism for rendering a sub-set window of logs, instead of fetching the entire log and attempting to render. Could possible default to showing last 1000 lines and then as user scrolls, fetch more by increase the sinceTimestamp value. Potentially utilise react-virtualized for this optimization.

I've seen some page freezing on large logs (>5MB), which can then be triggered to re-occur as you change between Logs|Status|Details.

kinfeature lifecyclfrozen

Most helpful comment

Design notes:

  • default behaviour: should it follow logs by default, and stop when the user scrolls or should it be opt-in?
  • should there be some UI control to toggle the following?
  • if there is a UI control, when should it be displayed and where should it be located? Should it affect just the current logs or persist globally?
  • review common patterns in existing solutions for reference.

Investigate existing libraries such as react-lazylog which provide follow functionality and determine if they're suitable as replacements for our existing logs component or whether we should keep our own and enhance it with the scroll / follow functionality.

react-lazylog also provides a HOC <ScrollFollow /> which might still be useful if we decide to keep our own logs component. There are other packages that provide similar functionality, although it may end up being making sense to implement our own depending on desired functionality.

All 15 comments

Thanks for the feedback and suggestions @castlemilk, they're much appreciated.

We're currently working on some significant design updates for the details view (which includes the logs) and will keep these in mind.

I've split out the performance problem to a separate issue https://github.com/tektoncd/dashboard/issues/347 and have an improvement on the way for that. We'll keep this issue for tracking the 'follow' feature request.

We have users viewing logs live so having a "follow" feature would be super convenient. Think of it like a console type of view :)

There was some changes/improvements around logs recently.
It would be nice to get this one too !

Agreed this would be really nice, and with the streaming changes should also give a better UX.

@stevesoaress is currently working on some changes to the processing and display of the log content so I think it would be a good idea to hold off on implementing this until those changes stabilise to avoid conflicts / rework.

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/remove-lifecycle rotten
/reopen

@AlanGreene: Reopened this issue.

In response to this:

/remove-lifecycle rotten
/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Design notes:

  • default behaviour: should it follow logs by default, and stop when the user scrolls or should it be opt-in?
  • should there be some UI control to toggle the following?
  • if there is a UI control, when should it be displayed and where should it be located? Should it affect just the current logs or persist globally?
  • review common patterns in existing solutions for reference.

Investigate existing libraries such as react-lazylog which provide follow functionality and determine if they're suitable as replacements for our existing logs component or whether we should keep our own and enhance it with the scroll / follow functionality.

react-lazylog also provides a HOC <ScrollFollow /> which might still be useful if we decide to keep our own logs component. There are other packages that provide similar functionality, although it may end up being making sense to implement our own depending on desired functionality.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

/lifecycle frozen

We should keep this simple and follow by default, stopping when the user scrolls. This shouldn't require any additional dependencies.

Mostafa will be working on this.

Autoscroll was added in https://github.com/tektoncd/dashboard/pull/2119. It's included in the latest nightly builds since 2021/07/13 and will be included in the next Dashboard release (v0.19.0 due in ~1-2 weeks).

Was this page helpful?
0 / 5 - 0 ratings