taskcluster / unified-logviewer

Mozilla Public License 2.0
2 stars 5 forks source link

Jump to line feature #5

Closed helfi92 closed 8 years ago

helfi92 commented 8 years ago

To experiment with this feature, select a line number in the log and then refresh the page. the log will take you to the selected line.

helfi92 commented 8 years ago

@eliperelman, I totally agree with you. Keeping the components functional is the way to go. I can implement a jumpToLine function in LogViewer that can take a lineNumber and scroll the window by an x amount of pixels and then let LazyList take control. I am aware there is currently no UI that can take a lineNumber. Do we need one or is that not important for now. I can also implement a jumpToHighlight function which will run if and only if there is a highlightStart number in the URL. I think that's a great feature to have. Thoughts?

helfi92 commented 8 years ago

@eliperelman latest commit addresses your comments. Looks a lot cleaner :)

helfi92 commented 8 years ago

Ok, this should do what you suggested. Requesting a review.

helfi92 commented 8 years ago

@eliperelman weird, but for this specific log, the line after 1446 turns into 1001.

screen shot 2016-10-13 at 6 44 00 pm

Works on the huge log though: http://localhost:4000/?url=https%3A%2F%2Fqueue.taskcluster.net%2Fv1%2Ftask%2FB8yyH1HORxKkQ9p1Sh0CFA%2Fruns%2F0%2Fartifacts%2Fpublic%2Flogs%2Flive_backing.log&highlightStart=&highlightEnd=&lineNumber=300000

Thoughts?

eliperelman commented 8 years ago

@helfi92 I'm not sure. You may want to try adding some console.logs to the code to see if you can debug what the expected coordinates, percentages, and window calculations are.

eliperelman commented 8 years ago

Looks like the line differences are because of some HTML non-escaping in the log. Will fix that in a follow up.