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

[cloudbees-disk-usage-simple] Extract inline script blocks and event handlers in com/cloudbees/simplediskusage/QuickDiskUsagePlugin/sidepanel.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 39
      ----
      <script>
                    function refresh(a) {
                        fetch("refresh", {
                            method: "post",
                            headers: crumb.wrap({}),
                        });
                        hoverNotification('${%Refresh scheduled}',a.parentNode);
                        return true;
                    }
                </script>
      ----
      
      == Inline Event Handler
      Line: 38
      ----
      <l:task href="." onclick="return refresh(this)" icon="icon-refresh icon-md" title="${%Refresh disk usage}" post="true"/>
      ----
      
      == Inline Script Block
      Line: 39
      ----
      <script>
                    function refresh(a) {
                        fetch("refresh", {
                            method: "post",
                            headers: crumb.wrap({}),
                        });
                        hoverNotification('${%Refresh scheduled}',a.parentNode);
                        return true;
                    }
                </script>
      ----
      
      == Inline Event Handler
      Line: 38
      ----
      <l:task href="." onclick="return refresh(this)" icon="icon-refresh icon-md" title="${%Refresh disk usage}" post="true"/>
      ----
      

      Solutions

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

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: