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

[stoplightio-report] Extract inline script block in com/arkea/satd/stoplightio/StoplightReportBuildAction/index.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 44
      ----
      <script type="text/javascript">
      			
      				google.charts.load('current', {packages:['corechart']});
      			    google.charts.setOnLoadCallback(drawChart);
      			    function drawChart() {
      			
      			      var data = google.visualization.arrayToDataTable([
      			        ['Build', 'No Test', 'Failed', 'Success' ],
      			        ['', ${it.noAssertionCount}, ${it.failedAssertionsCount}, ${it.succeededAssertionsCount}],
      			      ]);
      					
      			      var options = {
      			        width: 600,
      			        height: 100,
      			        legend: { position: 'top' },
      			        colors: ['yellow', 'red', 'lightgreen'],
      			        isStacked: 'percent',
      			      };
      			
      			      var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
      			      chart.draw(data, options);
      			      }
      			    </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: