Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10441#discussion_r48305560
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala ---
    @@ -1232,24 +1243,16 @@ private[ui] class TaskPagedTable(
     
       override def pageLink(page: Int): String = {
         val encodedSortColumn = URLEncoder.encode(sortColumn, "UTF-8")
    -    
s"${basePath}&task.page=$page&task.sort=${encodedSortColumn}&task.desc=${desc}" 
+
    -      s"&task.pageSize=${pageSize}"
    +    basePath +
    +      s"&$pageNumberFormField=$page" +
    +      s"&task.sort=$encodedSortColumn" +
    +      s"&task.desc=$desc" +
    +      s"&$pageSizeFormField=$pageSize"
       }
     
    -  override def goButtonJavascriptFunction: (String, String) = {
    -    val jsFuncName = "goToTaskPage"
    +  override def goButtonFormPath: String = {
         val encodedSortColumn = URLEncoder.encode(sortColumn, "UTF-8")
    -    val jsFunc = s"""
    -      |currentTaskPageSize = ${pageSize}
    -      |function goToTaskPage(page, pageSize) {
    -      |  // Set page to 1 if the page size changes
    --- End diff --
    
    This is not preserved. We need to add a new parameter in the url to support 
it.However, it's only a tiny issue. Maybe not worth to fix it. The worst case 
is the user changes to a bigger page size and encounters 
`IndexOutOfBoundsException`.
    
    BTW, I used JS previously was because of this issue. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to