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

[parasoft-findings] Extract inline script block in parasoftCoverage/trend-chart.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 68
      ----
      <script>
            {
                const trendProxy = <st:bind value="${it}"/>;
                echartsJenkinsApi.renderConfigurableTrendChart('${chartId}', '${enableLinks}', '${configurationId}', trendProxy);
                const parasoftCoverageTrendChart = jQuery3('#${chartId}')[0].echart;
                parasoftCoverageTrendChart.on('finished', function () {
                    if (parasoftCoverageTrendChart.getOption().toolbox[0].feature.myTool1.title != '${%setup.text}') {
                        parasoftCoverageTrendChart.setOption({
                            toolbox: {
                                feature: {
                                    myTool1: {
                                        title: '${%setup.text}'
                                    }
                                }
                            }
                        });
                    }
                });
            }
          </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: