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

[pipeline-as-yaml] Extract inline script block and event handlers in io/jenkins/plugins/pipeline/PipelineAsYamlSnippetizer/index.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 67
      ----
      <script>
              var pipelineAsYamlSnippetizer = <st:bind value="${it}" />
              function convertToDecButtonAction() {
                  var pipelineText = document.getElementById('pipelinePayTextArea').value;
                  pipelineAsYamlSnippetizer.convertToDec(pipelineText, function(t) {
                      document.getElementById('pipelineDecTextArea').value = t.responseObject();
                  });
              }
              function parseAndValidatePayAction() {
                  var pipelineText = document.getElementById('pipelinePayTextArea').value;
                  pipelineAsYamlSnippetizer.parseAndValidatePay(pipelineText, function(t) {
                      document.getElementById('validateResponse').innerText = t.responseObject();
                  });
              }
          </script>
      ----
      
      == Inline Event Handler
      Line: 47
      ----
      <input type="button" id="convertToDecButton" value="Convert To Pipeline Declarative Script" class="submit-button primary" onclick="convertToDecButtonAction()"  />
      ----
      
      == Inline Event Handler
      Line: 58
      ----
      <input type="button" id="parseAndValidatePay" value="Validate Pipeline" class="submit-button primary" onclick="parseAndValidatePayAction()"  />
      ----
      

      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: