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

Odd rendering of Monitoring of Jenkins master plugin in Manage Jenkins screen

    Details

    • Similar Issues:

      Description

      Jenkins ver. 2.226

      Support Core Plugin 2.67

      GitHub plugin 1.29.5

      Monitoring 1.82.0

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          My best guess is that this is a side effect of the description having inline HTML, and that interacting badly with the description being placed inside a link by core. I think the idea is to have nontrivial HTML be done via a custom Jelly view (but then I wonder why we support HTML in descriptions in the first place, probably an oversight).

          This has been broken since at least Jenkins (core) 2.103 (more than 2 years ago), when the Manage Jenkins page was previously re-styled. I just tried the plugin on 2.107.x, and the same issue appears there.

          Show
          danielbeck Daniel Beck added a comment - My best guess is that this is a side effect of the description having inline HTML, and that interacting badly with the description being placed inside a link by core. I think the idea is to have nontrivial HTML be done via a custom Jelly view (but then I wonder why we support HTML in descriptions in the first place, probably an oversight). This has been broken since at least Jenkins (core) 2.103 (more than 2 years ago), when the Manage Jenkins page was previously re-styled. I just tried the plugin on 2.107.x, and the same issue appears there.
          Hide
          jsoref Josh Soref added a comment -

          Oops, I guess it just wasn't as noticably bad without a sibling.

          Show
          jsoref Josh Soref added a comment - Oops, I guess it just wasn't as noticably bad without a sibling.
          Hide
          evernat evernat added a comment - - edited

          There are 3 <a/> html tags on "Monitoring of Jenkins master":

          <div class="manage-option manage-page__column">
          <a href="/monitoring" title="Monitoring of Jenkins master"><img src="/static/163b9cff/images/48x48/monitor.gif" alt="manage-option" class="icon"></a>
          <dl><a href="/monitoring" title="Monitoring of Jenkins master"><dt>Monitoring of Jenkins master</dt></a>
          <dd><a href="/monitoring" title="Monitoring of Jenkins master">Monitoring of memory, cpu, http requests and more in Jenkins master.</a><a href="./monitoring/nodes">You can also view the monitoring of builds, build queue and Jenkins nodes.</a></dd><dd></dd>
          </dl>
          </div>
          

          The other management links in the page have only the first one.
          Given that the view is AFAIK in manage.jelly:

            <a href="${m.urlName}" title="${m.displayName}">
          	<img class="icon" src="${iconUrl}" alt="manage-option"/>
          	<dl>
          	  <dt>${m.displayName}</dt>
          	  <dd><j:out value="${m.description}"/></dd>
          	  <dd><st:include it="${m}" page="info.jelly" optional="true"/></dd>
          	</dl>
            </a>
          

          and given that the ManagementLink code is https://github.com/jenkinsci/monitoring-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/monitoring/PluginManagementLink.java

          how can it print 3 <a/> html tags?

          Show
          evernat evernat added a comment - - edited There are 3 <a/> html tags on "Monitoring of Jenkins master": <div class= "manage-option manage-page__column" > <a href= "/monitoring" title= "Monitoring of Jenkins master" ><img src= "/ static /163b9cff/images/48x48/monitor.gif" alt= "manage-option" class= "icon" ></a> <dl><a href= "/monitoring" title= "Monitoring of Jenkins master" ><dt>Monitoring of Jenkins master</dt></a> <dd><a href= "/monitoring" title= "Monitoring of Jenkins master" >Monitoring of memory, cpu, http requests and more in Jenkins master.</a><a href= "./monitoring/nodes" >You can also view the monitoring of builds, build queue and Jenkins nodes.</a></dd><dd></dd> </dl> </div> The other management links in the page have only the first one. Given that the view is AFAIK in manage.jelly : <a href= "${m.urlName}" title= "${m.displayName}" > <img class= "icon" src= "${iconUrl}" alt= "manage-option" /> <dl> <dt>${m.displayName}</dt> <dd><j:out value= "${m.description}" /></dd> <dd><st:include it= "${m}" page= "info.jelly" optional= " true " /></dd> </dl> </a> and given that the ManagementLink code is https://github.com/jenkinsci/monitoring-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/monitoring/PluginManagementLink.java how can it print 3 <a/> html tags?
          Hide
          danielbeck Daniel Beck added a comment -

          how can it print 3 <a/> html tags?

          You're looking at the DOM, not the raw HTML source code returned by Jenkins. The problem is the illegal nesting of "a" tags (one to wrap the entire item, including img and dl/dt/dd; and one in dd from your description) which is resolved for the DOM, making the DOM HTML structure different than what is sent as text.

          Show
          danielbeck Daniel Beck added a comment - how can it print 3 <a/> html tags? You're looking at the DOM, not the raw HTML source code returned by Jenkins. The problem is the illegal nesting of "a" tags (one to wrap the entire item, including img and dl/dt/dd; and one in dd from your description) which is resolved for the DOM, making the DOM HTML structure different than what is sent as text.
          Hide
          evernat evernat added a comment -

          fixed by extracting the inline link in a second link next to the first one

          Show
          evernat evernat added a comment - fixed by extracting the inline link in a second link next to the first one

            People

            • Assignee:
              evernat evernat
              Reporter:
              jsoref Josh Soref
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: