• Stan Hu's avatar
    Remove duplicate XHR request when requesting new pipeline page · ec5bbd27
    Stan Hu authored
    When a user clicked on another page in the pipeline page, the following
    would happen:
    
    1. PipelinesService.getPipelines() would be called to fetch the new page
    2. In the success handler, Poll.restart() would be called
    3. This would invoke Poll.makeRequest(), which would fire off a new
    request.
    
    To fix this, we introduce a enable(), which will:
    
    1. Update the request data accordingly
    2. Clear the old timeout if necessary and start a new timer
    
    Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58095
    ec5bbd27
poll_spec.js 6.12 KB