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

Dashboard "Status of build" images missing after upgrade to 1.584

      The images for "status of build" are missing/unavailable.

          [JENKINS-25220] Dashboard "Status of build" images missing after upgrade to 1.584

          I'm seeing the same thing after upgrading from 1.551. I've got another instance running 1.574.

          In the 1.574 html, the img element reads:

          <img alt="Failed" class="icon16x16" src="/static/9380e5f1/images/16x16/red.png" tooltip="Failed" title="Failed">

          In the 1.585 html, the img element reads:

          <img alt="Failed" class="icon-red " tooltip="Failed" title="Failed">

          Michael Merrell added a comment - I'm seeing the same thing after upgrading from 1.551. I've got another instance running 1.574. In the 1.574 html, the img element reads: <img alt="Failed" class="icon16x16" src="/static/9380e5f1/images/16x16/red.png" tooltip="Failed" title="Failed"> In the 1.585 html, the img element reads: <img alt="Failed" class="icon-red " tooltip="Failed" title="Failed">

          I think the class should be "icon-red icon-sm" in order for it to look in the images/16x16 directory for red.png.

          Michael Merrell added a comment - I think the class should be "icon-red icon-sm" in order for it to look in the images/16x16 directory for red.png.

          There was a change to core/src/main/resources/lib/hudson/ballColorTd.jelly that replaced iconSize with iconSizeClass:

          • <img src="${it.getImageOf(iconSize)}" alt="${it.description}"
          • tooltip="${it.description}" style="${attrs.style}" class="icon${iconSize}"/>
            + <l:icon class="${it.iconClassName} ${iconSizeClass}" alt="${it.description}"
            + tooltip="${it.description}" style="${attrs.style}" />

          In cases where iconSize is being set by a jelly attribute, iconSize is converted to iconSizeClass:

          <!-- convert legacy @iconSize specification to @iconSizeClass -->
          <j:if test="${iconSizeClass==null and attrs.iconSize!=null}">
          <j:set var="iconSizeClass" value="${icons.toNormalizedIconSizeClass(attrs.iconSize)}"/>
          </j:if>

          However, it looks like the iconSize is set as a variable in the build statistics jelly file.

          dashboard-view-plugin/src/main/resources/hudson/plugins/view/dashboard/stats/StatBuilds/statbuilds.jelly:

          <j:set var="iconSize" value="16x16" />
          ...
          <t:ballColorTd it="${col.key}" />

          So, either the plugin needs to be updated to use iconSizeClass or pass the iconSize as an attribute; or ballColorTd.jelly needs to convert iconSize as well as attrs.iconSize. Or both.

          Michael Merrell added a comment - There was a change to core/src/main/resources/lib/hudson/ballColorTd.jelly that replaced iconSize with iconSizeClass: <img src="${it.getImageOf(iconSize)}" alt="${it.description}" tooltip="${it.description}" style="${attrs.style}" class="icon${iconSize}"/> + <l:icon class="${it.iconClassName} ${iconSizeClass}" alt="${it.description}" + tooltip="${it.description}" style="${attrs.style}" /> In cases where iconSize is being set by a jelly attribute, iconSize is converted to iconSizeClass: <!-- convert legacy @iconSize specification to @iconSizeClass --> <j:if test="${iconSizeClass==null and attrs.iconSize!=null}"> <j:set var="iconSizeClass" value="${icons.toNormalizedIconSizeClass(attrs.iconSize)}"/> </j:if> However, it looks like the iconSize is set as a variable in the build statistics jelly file. dashboard-view-plugin/src/main/resources/hudson/plugins/view/dashboard/stats/StatBuilds/statbuilds.jelly: <j:set var="iconSize" value="16x16" /> ... <t:ballColorTd it="${col.key}" /> So, either the plugin needs to be updated to use iconSizeClass or pass the iconSize as an attribute; or ballColorTd.jelly needs to convert iconSize as well as attrs.iconSize. Or both.

          Michael Merrell added a comment - Pull request https://github.com/jenkinsci/jenkins/pull/1452

          Closed that pull request and opened another with a smaller change. https://github.com/jenkinsci/jenkins/pull/1455

          Michael Merrell added a comment - Closed that pull request and opened another with a smaller change. https://github.com/jenkinsci/jenkins/pull/1455

          Ryan Gibbons added a comment -

          What's the status of this, we've had the same issue for a while. I know it's not a high priority but would make things nicer to look at.

          Ryan Gibbons added a comment - What's the status of this, we've had the same issue for a while. I know it's not a high priority but would make things nicer to look at.

          Well, my pull request is still open, so it hasn't been fixed by that route. You can always make the change to the jelly file locally and repack the WAR file like I have.

          Michael Merrell added a comment - Well, my pull request is still open, so it hasn't been fixed by that route. You can always make the change to the jelly file locally and repack the WAR file like I have.

          riftware added a comment -

          I made the mistake of doing an update for the first time in about 6 or 9 months. The main screen on my install is now missing all the stuff that would have been to the left of the editable views (executor statutus plus the nav items) I can still get to them by clicking the jenkins pull down menu but it is uglier. I'm assuming this is the same bug?

          riftware added a comment - I made the mistake of doing an update for the first time in about 6 or 9 months. The main screen on my install is now missing all the stuff that would have been to the left of the editable views (executor statutus plus the nav items) I can still get to them by clicking the jenkins pull down menu but it is uglier. I'm assuming this is the same bug?

          Code changed in jenkins
          User: michmerr
          Path:
          core/src/main/resources/lib/hudson/ballColorTd.jelly
          http://jenkins-ci.org/commit/jenkins/032501dcdfe7a06cbb745786dc0a49b3a6188257
          Log:
          [FIXED JENKINS-25220] - Handle legacy use of iconSize as a variable (#1455)

          • Handle legacy use of iconSize as a variable

          When iconSize was set as a jelly variable, not passed as an attribute,
          the value was not being normalized to an IconSizeClass. Fixes
          JENKINS-25220.

          • Evaluate attrs.iconSize explicitly.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: michmerr Path: core/src/main/resources/lib/hudson/ballColorTd.jelly http://jenkins-ci.org/commit/jenkins/032501dcdfe7a06cbb745786dc0a49b3a6188257 Log: [FIXED JENKINS-25220] - Handle legacy use of iconSize as a variable (#1455) Handle legacy use of iconSize as a variable When iconSize was set as a jelly variable, not passed as an attribute, the value was not being normalized to an IconSizeClass. Fixes JENKINS-25220 . Evaluate attrs.iconSize explicitly.

          Oleg Nenashev added a comment -

          Released as Jenkins-2.6

          Oleg Nenashev added a comment - Released as Jenkins-2.6

            petehayes Peter Hayes
            skhushalani Sagar Khushalani
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: