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

[promoted-builds-simple] Extract inline script block in WEB-INF/classes/hudson/plugins/promoted_builds_simple/PromoteAction/summary.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 36
      ----
      <script language="javascript">// &lt;![CDATA[
            YAHOO.util.Event.onContentReady("promotemenu", function () {
              var promoteMenu = new YAHOO.widget.Menu("promotemenu",
                {
                  position: "static",
                  hidedelay: 750,
                  lazyload: true,
                  effect: {
                      effect: YAHOO.widget.ContainerEffect.FADE,
                      duration: 0.25
                  },
                  itemdata: [ { text: "${%Promote Build}",
                                submenu: { id: "promotechoices", itemdata: [
                            <j:if test="${hasLevel}">
                                  { text: "${%None}", url: "promote/?level=0" },
                            </j:if>
                            <j:forEach var="level" indexVar="i" items="${it.allPromotionLevels}">
                                  { text: "${level.name}", url: "promote/?level=${i+1}"
                                    <j:if test="${it.level == level.name}">, checked: true</j:if> },
                            </j:forEach>
                                ] }
                              } ]
                }
              );
              promoteMenu.render();
            });
            // ]]&gt;</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: