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

[warnings-ng] Un-inline JavaScript in IssuesChartPortlet/portlet.jelly

XMLWordPrintable

    • 11.10.0

      Culprit

      https://github.com/jenkinsci/warnings-ng-plugin/blob/e659c7ada2792573a475e50242ef4c9d9bdb9b85/plugin/src/main/resources/io/jenkins/plugins/analysis/core/portlets/IssuesChartPortlet/portlet.jelly#L18-L24

      Solution

      Use st:bind with var attribute to define a global variable, which can then be accessed from JavaScript. Use data attributes with e.g. span element to pass whatever other data is needed.
      (No docs exist AFAICT? Perhaps we could improve here )

            yafenkin Yaroslav Afenkin
            yafenkin Yaroslav Afenkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: