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

f:repeatable error in Elasticbox plugin (regression in 2.264)

    XMLWordPrintable

Details

    Description

      While trying to understand more completely the usage of YAHOO.util.Connect (for PR-6840), I was looking at variables.js (thanks Basil for the pointer).
      I was not able to configure the plugin correctly as the repeatable agent configuration was broken. It seems that the placeholder content is displayed but it's not parsed when sent to the server and there is no way to add new ones. I imagine it's just because of the JS error that the form is not rendered correctly.

      I tested with 2.359, it's broken. When tested with 2.222.4, the plugin (with same version) was working fine, meaning it's highly likely that the root cause is about a recent UI change.

      Attachments

        Activity

          danielbeck Daniel Beck added a comment -

          Works in Jenkins 2.263.2. Broken in 2.264 and 2.277.4.

          danielbeck Daniel Beck added a comment - Works in Jenkins 2.263.2. Broken in 2.264 and 2.277.4.
          danielbeck Daniel Beck added a comment -

          timja Could you clarify why this is a plugin issue and not a core issue?

          danielbeck Daniel Beck added a comment - timja Could you clarify why this is a plugin issue and not a core issue?
          timja Tim Jacomb added a comment -

          The error message in the GIF shows that the DOM is not built correctly because the browser has tried to fix invalid HTML.

          There's a number of tables in the plugin that likely need cleaned up for it to work:

          ➜  elasticbox-plugin git:(master) rg -A 3 -F '<table'
          src/main/resources/com/elasticbox/jenkins/builders/ReconfigureBox/config.jelly
          25:                <table style="width:100%; margin-left: 15px;" class="setting-leftspace">
          26-                    <tbody class="eb-variable-inputs">
          27-                        <tr>
          28-                            <td class="setting-leftspace">
          --
          50:                <table style="width:100%; margin-left: 15px;" class="setting-leftspace">
          51-                    <tbody class="eb-variable-inputs">
          52-                        <tr>
          53-                            <td class="setting-leftspace">
          
          src/main/resources/com/elasticbox/jenkins/builders/BoxRequiredOperation/config.jelly
          30:            <table style="width:100%; margin-left: 15px;" class="setting-leftspace">
          31-                <tbody class="eb-variable-inputs">
          32-                    <tr>
          33-                        <td>
          
          src/main/resources/com/elasticbox/jenkins/builders/DeployBox/variables.jelly
          19:        <table style="width:100%;">
          20-            <tbody class="eb-variable-inputs">
          21-                <tr/>
          22-            </tbody>
          
          src/main/resources/com/elasticbox/jenkins/builders/UpdateBox/config.jelly
          29:        <table style="width:100%; margin-left: 15px;" class="setting-leftspace">
          30-            <tbody class="eb-variable-inputs">
          31-                <tr>
          32-                    <td>
          
          src/main/resources/com/elasticbox/jenkins/SlaveConfiguration/config.jelly
          14:  <table width="100%">
          15-    <f:invisibleEntry>
          16-        <f:textbox clazz="help" field="id"/>
          17-    </f:invisibleEntry>
          
          src/main/webapp/js/variables.js
          14:    var VARIABLE_TABLE_TEMPLATE = '<td><table style="width:100%; margin-left: 15px;"><tbody><tr>' +
          15-                '<td class="setting-leftspace" colspan="4" style="background-image: linear-gradient(to bottom, #ffffff, #eef0f2); ">' +
          16-                '<span style="cursor: pointer; ">&nbsp;<img src="{3}/expanded.png">&nbsp;' +
          17-                '<img height="16" width="16" src="{2}">&nbsp;<b>{0} {1}</b></span></td></tr>' +
          

          (and unlikely to be fixed as it has only 40 installs and an announced security vulnerability)

          timja Tim Jacomb added a comment - The error message in the GIF shows that the DOM is not built correctly because the browser has tried to fix invalid HTML. There's a number of tables in the plugin that likely need cleaned up for it to work: ➜ elasticbox-plugin git:(master) rg -A 3 -F '<table' src/main/resources/com/elasticbox/jenkins/builders/ReconfigureBox/config.jelly 25: <table style= "width:100%; margin-left: 15px;" class= "setting-leftspace" > 26- <tbody class= "eb-variable-inputs" > 27- <tr> 28- <td class= "setting-leftspace" > -- 50: <table style= "width:100%; margin-left: 15px;" class= "setting-leftspace" > 51- <tbody class= "eb-variable-inputs" > 52- <tr> 53- <td class= "setting-leftspace" > src/main/resources/com/elasticbox/jenkins/builders/BoxRequiredOperation/config.jelly 30: <table style= "width:100%; margin-left: 15px;" class= "setting-leftspace" > 31- <tbody class= "eb-variable-inputs" > 32- <tr> 33- <td> src/main/resources/com/elasticbox/jenkins/builders/DeployBox/variables.jelly 19: <table style= "width:100%;" > 20- <tbody class= "eb-variable-inputs" > 21- <tr/> 22- </tbody> src/main/resources/com/elasticbox/jenkins/builders/UpdateBox/config.jelly 29: <table style= "width:100%; margin-left: 15px;" class= "setting-leftspace" > 30- <tbody class= "eb-variable-inputs" > 31- <tr> 32- <td> src/main/resources/com/elasticbox/jenkins/SlaveConfiguration/config.jelly 14: <table width= "100%" > 15- <f:invisibleEntry> 16- <f:textbox clazz= "help" field= "id" /> 17- </f:invisibleEntry> src/main/webapp/js/variables.js 14: var VARIABLE_TABLE_TEMPLATE = '<td><table style= "width:100%; margin-left: 15px;" ><tbody><tr>' + 15- '<td class= "setting-leftspace" colspan= "4" style= "background-image: linear-gradient(to bottom, #ffffff, #eef0f2); " >' + 16- '<span style= "cursor: pointer; " >&nbsp;<img src= "{3}/expanded.png" >&nbsp;' + 17- '<img height= "16" width= "16" src= "{2}" >&nbsp;<b>{0} {1}</b></span></td></tr>' + (and unlikely to be fixed as it has only 40 installs and an announced security vulnerability)
          danielbeck Daniel Beck added a comment -

          Makes sense, thanks

          danielbeck Daniel Beck added a comment - Makes sense, thanks

          People

            Unassigned Unassigned
            wfollonier Wadeck Follonier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: