kyoty opened a new pull request #32223:
URL: https://github.com/apache/spark/pull/32223


   ### What changes were proposed in this pull request?
   
   To make sure that pageSize shoud not be shared between different stage pages.
   The screenshots of the problem are placed in the attachment of 
[JIRA](https://issues.apache.org/jira/browse/SPARK-35127)
   
   in util.js, a config: `stateSave` will be set to true:
   ```javascript
       function setDataTableDefaults() {
         $.extend($.fn.dataTable.defaults, {
           stateSave: true,
           stateSaveParams: function(_, data) {
               data.search.search = "";
           },
           lengthMenu: [[20, 40, 60, 100, -1], [20, 40, 60, 100, "All"]],
           pageLength: 20
         });
       }
   ```
   
   according to 
reference:https://datatables.net/reference/option/stateSave#Description
   The browser will store state information such as pagination position, 
display length, filtering and sorting if `sateSave` is true.
    active-tasks-table  has a dynamic entry option:
   
    ```javascript
   var taskTable = "#active-tasks-table";
                       var taskConf = {
                           "serverSide": true,
                           "paging": true,
                           "info": true,
                           "processing": true,
                           "lengthMenu": [[20, 40, 60, 100, totalTasksToShow], 
[20, 40, 60, 100, "All"]],
                           ...
   
   ```
   If the browser caches the `totalTasksToShow` of the previous page, **the new 
page would  use this expired totalTasksToShow, which will cause the entry item 
to display empty.**
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   manual test, it is a small io problem, and the modification does not affect 
the function, but just an adjustment of js configuration


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to