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

      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

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

          Basil Crow created issue -
          Basil Crow made changes -
          Assignee Original: Marcel Birkner [ marcelbirkner ]
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Event Handler
          Line: 68
          ----
          <a id="deployLink" title="${%main.view.deploy.app.link}" href="" onclick="deploy(); return false;">
          ----

          == 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;">
          ----

          == 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>
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks]
          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          New: h4. Problems

          {noformat}
          == 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;">
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks]
          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          Summary Original: [ec2-deployment-dashboard] Extract inline script blocks and event handlers in de/codecentric/jenkins/dashboard/DashboardView/main.jelly New: [ec2-deployment-dashboard] Extract inline script block and event handler in de/codecentric/jenkins/dashboard/DashboardView/main.jelly

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

              Created:
              Updated: