Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-74122

[pipeline-aggregator-view] Extract inline script blocks in com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/index.jelly

XMLWordPrintable

      Note

      While testing this plugin, evaluate whether the third-party libraries inĀ src/main/webapp/lib are compatible with CSP in restrictive mode. The plugin may need to be upgraded from jQuery 1.x to 3.x to fully function in CSP restrictive mode.

      Problems

      == Inline Script Block
      Line: 24
      ----
      <script type="text/javascript">
                      var url = window.location.href
                      var refreshInterval = ${it.refreshInterval}
                      var buildHistorySize = ${it.buildHistorySize};
                      var useScrollingCommits= ${it.useScrollingCommits};
                      var onlyLastBuild= ${it.onlyLastBuild};
                      var showCommitInfo = ${it.showCommitInfo};
                      var showBuildNumber = ${it.showBuildNumber};
                      var showBuildTime = ${it.showBuildTime};
                      var showBuildDuration = ${it.showBuildDuration};
                      function reload_info (interval) {
                          reload_jenkins_build_history('#jenkinsBuildHistory', url, buildHistorySize, useScrollingCommits, onlyLastBuild, showCommitInfo, showBuildNumber, showBuildTime, showBuildDuration);
                          setTimeout(function(){ reload_info(interval); }, interval);
                      }
                  </script>
      ----
      
      == Inline Script Block
      Line: 54
      ----
      <script type="text/javascript">
                                          if(showCommitInfo) {
                                              document.write("<th>${%Commits}</th>");
                                          }
                                          if(showCommitInfo) {
                                              document.write("<th>${%Build}</th>");
                                          }
                                          if(showBuildTime) {
                                              document.write("<th>${%Finished}</th>");
                                          }
                                          if(showBuildDuration) {
                                              document.write("<th>${%Duration}</th>");
                                          }
                                      </script>
      ----
      
      == Inline Script Block
      Line: 78
      ----
      <script type="text/javascript">
                      var $$ = jQuery;
                      $$(document).ready(function(){
                          $$.ajaxSetup({ cache: false });
                          reload_info(refreshInterval);
                      });
                  </script>
      ----
      

      Solution

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: