Uh oh!
There was an error while loading. Please reload this page.
[SPARK-8171] [Web UI] Javascript based infinite scrolling for the log page - #10910
[SPARK-8171] [Web UI] Javascript based infinite scrolling for the log page#10910ajbozarth wants to merge 7 commits into
Conversation
ajbozarth
commented
Jan 26, 2016
I spent some time looking into ways to use javascript to load the content rather than use a page refresh and all the solutions I found required that the file has to be available on the web-server itself, which is very difficult to do with a continuously updating log file. Instead I implemented a alteration to the current pagination that adds to the top (or bottom) of the log a page at a time rather than limiting you to read only a page at a time. By setting the scroll starting location at page load this simulates an infinite scroll even though the page is re-loading. I also set the log to scroll to the bottom on initial page load. Given this is inspired by but not exactly the original jira and does distinctly change the use of this page I would love to get peoples opinions on it's usability, look and feel, and if it's worth the change at all. |
JoshRosen
commented
Jan 26, 2016
Screenshot? Please include them for all UI changes. |
ajbozarth
commented
Jan 26, 2016
SparkQA
commented
Jan 26, 2016
Test build #50050 has finished for PR 10910 at commit
|
ajbozarth
commented
Jan 26, 2016
Retest this please |
SparkQA
commented
Jan 26, 2016
Test build #50065 has finished for PR 10910 at commit
|
holdenk
commented
Jan 26, 2016
So every time the user clicks "load more" it will request/fetch all of the log that has already been loaded again? (Just trying to understand the design). |
ajbozarth
commented
Jan 26, 2016
When the user clicks load more the page refreshes and on the new page load it reads a larger chunk of the file. |
JoshRosen
commented
Jan 26, 2016
This isn't quite what I had in mind when filing that JIRA; the UX that I envisioned was something where if a user clicks "load more" the Javascript requests only the new / additional portion log output from the backend then update the UI without reloading the page. |
ajbozarth
commented
Jan 26, 2016
I had that in mind too, I just had this implementation in my head as an alternative and wanted to see what you thought. If you'd rather stick with what we have for now and wait until we figure out a js solution, then we can close this PR. I'll also spend just a bit more time trying to find a js solution to fetching the file data before moving to another task. |
JoshRosen
commented
Jan 27, 2016
Yeah, let's close this for the time being and re-open when you have a new approach which is ready to be reviewed. |
ajbozarth
commented
Jan 30, 2016
Thanks @JoshRosen for rejecting my first version, making it did helped me find this new solution using js though. Few questions: |
ajbozarth
commented
Jan 30, 2016
ajbozarth
commented
Jan 30, 2016
@ckadner this was what I was showing you if you want to take a look |
SparkQA
commented
Jan 30, 2016
Test build #50439 has finished for PR 10910 at commit
|
andrewor14
commented
Feb 1, 2016
ajbozarth
commented
Feb 3, 2016
@JoshRosen opinions on the updated version? |
ajbozarth
commented
Feb 8, 2016
Just in case it fell through the cracks last week, what do people think of the new javascript-based log page? |
ajbozarth
commented
Feb 11, 2016
@tgravescs thanks for all the help on those other PRs, mind taking a look at this one? |
ajbozarth
commented
Feb 25, 2016
@sarutak@JoshRosen@tgravescs in case this slipped past you guys due to Spark Summit last week |
ajbozarth
commented
Mar 21, 2016
@JoshRosen If you have time to take a second look at this, it's been sitting in limbo for a while, thanks |
ajbozarth
commented
Mar 28, 2016
@sarutak@JoshRosen@tgravescs I know you guys are busy getting ready for Spark Summit West, but I was wondering if you had an eta on looking at this? It's been open for a couple months now, thanks. |
sarutak
commented
Mar 29, 2016
@ajbozarth I'll check it soon. |
| function tailLog() { | ||
| $(".log-content").scrollTop($(".log-content")[0].scrollHeight); | ||
| } |
There was a problem hiding this comment.
It's not good to repeat a query for the same dom-objects like $(.log-content).
Similar repetitions are in some places in this change.
sarutak
commented
Apr 4, 2016
@ajbozarth Sorry for having you wait. I've inspected quickly and left some comments. @JoshRosen I think this feature itself is useful but is this the feature you had in mind? |
ajbozarth
commented
Apr 4, 2016
@sarutak thanks for the feedback, I'll look through and address them as I have time over the next couple days |
ajbozarth
commented
Apr 7, 2016
@sarutak I just went through your comments and responded and made fixes. I'm currently testing locally and will push my changes later today. |
SparkQA
commented
Apr 8, 2016
Test build #55251 has finished for PR 10910 at commit
|
ajbozarth
commented
Apr 13, 2016
@sarutak@JoshRosen What do you think of the latest changes? |
sarutak
commented
Apr 15, 2016
@ajbozarth Thank you for the update. I'll check it next Sunday or Monday. |
| url: "/log" + baseParams + "&offset=" + offset + "&byteLength=" + moreByteLength, | ||
| success: function (data) { | ||
| var oldHeight = $(".log-content")[0].scrollHeight; | ||
| var newlineIndex = data.indexOf('\n') |
sarutak
commented
Apr 18, 2016
@ajbozarth I've left some comments about very trivial nits, otherwise LGTM. |
| Previous 0 B | ||
| </button> | ||
| } | ||
| val curLogLength = endByte - startByte; |
ajbozarth
commented
Apr 18, 2016
Fixed the semicolons, switching back and forth between js and scala when they're "optional" on both really messes with you. Thanks @sarutak |
SparkQA
commented
Apr 18, 2016
Test build #56098 has finished for PR 10910 at commit
|
sarutak
commented
Apr 18, 2016
LGTM. If we have no other comments within 24 hours, I'll merge this. |
sarutak
commented
Apr 20, 2016
Merging this into |








Updated the log page by replacing the current pagination with a javascript-based infinite scroll solution