buildbot/buildbot — pull request #1347 by tardyp (2014-11-11 23:03:41+00:00)
Title: rework logviewer

as per http://trac.buildbot.net/ticket/2982 the old implementation was very slow for big logs, because a table with the whole data was loaded.

With this implementation, we play with scrolling position to find out which data to load, and load only necessary data
invisible parts of the log are replaced with padding div, which height is properly calculated

based on https://github.com/Hill30/NGScroller (MIT license)

ui.scroll is a good directive for infinite scrolling. Its inner working makes it not very adapted to viewing log:

This scroll directive uses ui.scroll base, but replace the whole DOM manipulation code
- Can directly scroll to arbitrary position
- Dont remove out-of-sight DOM. Eventually this will result in huge dom, so please make sure to use bind-once childs.
This however as the advantage on only loading each line once.
- Support line count, and adapt scroll bar appropriately
- Can follow the end of stream, via updating the scroll-position attribute
- row height is fixed (or you cannot make geometric calculation to determine the positions of arbitrary elements)

This directive uses JQuery for DOM manipulation

Note that we loose filtering, which is to hard to make efficient right now.

Signed-off-by: Pierre Tardy