[peass-ci] Extract inline script block and event handlers in de/dagere/peass/ci/clean/CleanAction/index.jelly

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 39
      ----
      <script type="text/javascript">
                  function cleanAll() {
                  $.get("../cleanAll", function ( data ){
                  const jsonData = JSON.parse(data);
                  document.getElementById("result").innerHTML=jsonData.message;
                  document.getElementById("result").style.backgroundColor=jsonData.color;
                  document.getElementById("result").style.display='inline-block';
                  });
                  }
      
                  function cleanMeasurements() {
                  $.get("../cleanMeasurements", function ( data ){
                  const jsonData = JSON.parse(data);
                  document.getElementById("result").innerHTML=jsonData.message;
                  document.getElementById("result").style.backgroundColor=jsonData.color;
                  document.getElementById("result").style.display='inline-block';
                  });
                  }
      
                </script>
      ----
      
      == Inline Event Handler
      Line: 60
      ----
      <a href='#' class='yui-button yui-submit-button submit-button primary' onClick='cleanAll();'>
      ----
      
      == Inline Event Handler
      Line: 62
      ----
      <a href='#' class='yui-button yui-submit-button submit-button primary' onClick='cleanMeasurements();'>
      ----
      

      Solutions

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
      https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers

            Assignee:
            Unassigned
            Reporter:
            Basil Crow
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: