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

[rabbitmq-consumer] Extract inline script block in org/jenkinsci/plugins/rabbitmqconsumer/GlobalRabbitmqConfiguration/config.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 16
      ----
      <script type="text/javascript">
            function checkConnection() {
              var descriptor = <st:bind value="${descriptor}" />
              descriptor.isOpen(function (t) {
                if(t.responseObject() == true) {
                  document.getElementById('rabbitmq-status-text').innerHTML = "${%connected}";
                  document.getElementById('rabbitmq-status-img').src = "${imagesURL}/16x16/blue.png";
                } else {
                  document.getElementById('rabbitmq-status-text').innerHTML = "${%disconnected}";
                  document.getElementById('rabbitmq-status-img').src = "${imagesURL}/16x16/red.png";
                }
              });
            }
            checkConnection();
            window.setInterval(function(){checkConnection()}, 15000);
          </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: