-
Task
-
Resolution: Unresolved
-
Minor
Problem
== Inline Script Block Line: 64 ---- <script> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawCharts); function drawCharts() { // restore Array.prototype.entries native behaviour (see JENKINS-49319) Array.prototype.entries = function() { return Object.entries(this).map(([key,value]) => [+key, value])[Symbol.iterator](); } drawCpuChart(); drawMemoryChart(); } function drawCpuChart() { var data = google.visualization.arrayToDataTable(${dbrd.cpuUsage}); var options = { title: 'CPU Usage', width: '100%', legend: { position: 'top', alignment: 'start', maxLines: '4' } }; var chart = new google.visualization.PieChart(document.getElementById('cpu-usage-chart')); chart.draw(data, options); } function drawMemoryChart() { var data = google.visualization.arrayToDataTable(${dbrd.memoryUsage}); var options = { title: 'Memory Usage', width: '100%', legend: { position: 'top', alignment: 'start', maxLines: '4' } }; var chart = new google.visualization.PieChart(document.getElementById('mem-usage-chart')); chart.draw(data, options); } window.addEventListener("resize", function(){ drawCpuChart(); drawMemoryChart(); }); </script> ----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks