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

[BlazeMeterJenkinsPlugin] Extract inline script block in hudson/plugins/blazemeter/BlazemeterCredentialsBAImpl/credentials.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 41
      ----
      <script>
          
              // Removed OK or Save button for rest of the users
              let btnOK = document._getElementsByXPath("//button[text()='OK']")[0];
              if (!btnOK) {
                  var timer = setInterval(function() {
                      let btnSave = document._getElementsByXPath("//button[text()='Save']")[0];
                      if (btnSave) {
                          btnSave.remove();
                          clearInterval(timer);
                      }
                  }, 100);
              } else {
                  btnOK.remove();
              }
      
              // Removed delete button
              let btnDelete = document._getElementsByXPath("//a[@title='Delete']")[0];
              if (btnDelete) {
                  btnDelete.remove();
              }
      
              // Removed Label and Credentials drop-down 
              let labelKind = document._getElementsByXPath("//div[contains(text(),'Kind')]")[0];
              let credentialsTypeSelectBox = document.querySelector("select");
              labelKind.remove();
              credentialsTypeSelectBox.remove();
          </script>
      ----
      

      Solution

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

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

              Created:
              Updated: