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

[ec2-deployment-dashboard] Extract inline script block and event handler in de/codecentric/jenkins/dashboard/DashboardView/main.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 24
      ----
      <script>
      	  function deploy() {
      	    var app = <st:bind value="${it}"/>
      	    var version = document.getElementById('versionId').value;
      	    var environment = document.getElementById('environmentId').value;
      	    document.getElementById('msg').innerHTML = "Deploying VERSION [" + version + "] to ENVIRONMENT [" + environment + "]. Please wait ...";
      	    app.deploy(version, environment, function(t) {
      	      document.getElementById('msg').innerHTML = t.responseObject();
      	    })
      	  }
        	</script>
      ----
      
      == Inline Event Handler
      Line: 68
      ----
      <a id="deployLink" title="${%main.view.deploy.app.link}" href="" onclick="deploy(); return false;">
      ----
      

      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: