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

[multi-module-tests-publisher] Extract inline script block in com/cwctravel/hudson/plugins/multimoduletests/junit/ModuleResult/body.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 28
      ----
      <script type="text/javascript">
      		<!-- TODO make sure load doesn't happen every time -->
      		function showStackTrace(id,query) {
      			var element = document.getElementById(id)
      			element.style.display = "";
      			document.getElementById(id + "-showlink").style.display = "none";
      			document.getElementById(id + "-hidelink").style.display = "";
      			
      			var rqo = new XMLHttpRequest();
      			rqo.open('GET', query, true);
      			rqo.onreadystatechange = function() { element.innerHTML = rqo.responseText; }  
      			rqo.send(null);
      		}
      		
      		function hideStackTrace(id) {
      			document.getElementById(id).style.display = "none";
      			document.getElementById(id + "-showlink").style.display = "";
      			document.getElementById(id + "-hidelink").style.display = "none";
      		}
        </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: