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

[peass-ci] Extract inline script block in de/dagere/peass/ci/TrendAction/index.jelly

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • _unsorted

      Problem

      == Inline Script Block
      Line: 30
      ----
      <script>
      				var means = {
      					x: ${it.getBuildnumbersReadable(testcase)},
      					y: ${it.getMeansReadable(testcase)},
      					color: 'black',
      					mode: 'lines+markers',
      					line: {
      				      color: 'black',
      				    }
      					};
      					
      				var deviationLower = {
      					x: ${it.getBuildnumbersReadable(testcase)},
      					y: ${it.getLowerBoundReadable(testcase)},
       					type: 'lines',
       					showlegend: false,
      					line: {
      					  dash: 'dot',
      				      color: 'black'
      				    }
      					};
      				var area = {
      					x: ${it.getBuildnumbersReadable(testcase)},
      					y: ${it.getLowerBoundReadable(testcase)},
      					fill: 'tonexty',
       					type: 'lines',
       					showlegend: false,
       					line: {color: '#CCFFCC', mode: 'none'}
      					};
      					
      				var deviationUpper = {
      					x: ${it.getBuildnumbersReadable(testcase)},
      					y: ${it.getUpperBoundReadable(testcase)},
      					mode: 'lines+markers',
       					showlegend: false,
      					line: {
      					  dash: 'dot',
      				      color: 'black', 
      				      opacity: 0.1
      				    }
      					};
      
      				var data = [ deviationUpper, area, deviationLower, means ];
      
      				var	layout =
      				{
      					title: { text: "${testcase}"},
      					xaxis: { title: {
      					text: "Buildnumber"} },
      					yaxis: { title: { text: "Duration / ms"} },
      				};
      
      				Plotly.newPlot('meanValuePlot_${testcase}',
      					data,
      					layout);
      				</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: