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

Provide the current width of a portlet as a variable to a plug-in that provides a portlet

    Details

    • Similar Issues:

      Description

      The analysis plug-ins provides several portlets with user configurable width and height. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice).

      (The same would be good for the height, too. Here at least a default height would be nice to have.)

        Attachments

          Activity

          drulli Ulli Hafner created issue -
          drulli Ulli Hafner made changes -
          Field Original Value New Value
          Description I'm currently adding some portlets that render the trend graphs for my static analysis plug-ins. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice). The same would be good for the height, here at least a default height would be nice to have.

          Currently, the width and height is hardwired:

          {code}
          <div align="center">
            <img id="graph" src="${it.url}warningsGraph/png?width=600&amp;height=450" lazymap="${it.url}warningsGraph/map" alt="${it.description}"/>
          </div>
          {code}

          What I would like to have is something like

          {code}
          <div align="center">
            <img id="graph" src="${it.url}warningsGraph/png?width=${it.width};height=${it.height}" lazymap="${it.url}warningsGraph/map" alt="${it.description}"/>
          </div>
          {code}

          I'm currently adding some portlets that render the trend graphs for my static analysis plug-ins. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice).

          (The same would be good for the height, too. Here at least a default height would be nice to have. However, the actual height should be overwritable by the user in the portlet configuration.)

          Currently, the width and height is hardwired:

          {code}
          <div align="center">
            <img id="graph" src="${it.url}warningsGraph/png?width=600&amp;height=450" lazymap="${it.url}warningsGraph/map" alt="${it.description}"/>
          </div>
          {code}

          What I would like to have is something like

          {code}
          <div align="center">
            <img id="graph" src="${it.url}warningsGraph/png?width=${it.width};height=${it.height}" lazymap="${it.url}warningsGraph/map" alt="${it.description}"/>
          </div>
          {code}

          drulli Ulli Hafner made changes -
          Summary Provide the width of the portlet as a variable Provide the current width of a portlet as a variable to a plug-in that provides a portlet
          Description I'm currently adding some portlets that render the trend graphs for my static analysis plug-ins. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice).

          (The same would be good for the height, too. Here at least a default height would be nice to have. However, the actual height should be overwritable by the user in the portlet configuration.)

          Currently, the width and height is hardwired:

          {code}
          <div align="center">
            <img id="graph" src="${it.url}warningsGraph/png?width=600&amp;height=450" lazymap="${it.url}warningsGraph/map" alt="${it.description}"/>
          </div>
          {code}

          What I would like to have is something like

          {code}
          <div align="center">
            <img id="graph" src="${it.url}warningsGraph/png?width=${it.width};height=${it.height}" lazymap="${it.url}warningsGraph/map" alt="${it.description}"/>
          </div>
          {code}

          The analysis plug-ins provides several portlets with user configurable width and height. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice).

          (The same would be good for the height, too. Here at least a default height would be nice to have. However, the actual height should be overwritable by the user in the portlet configuration.)
          drulli Ulli Hafner made changes -
          Description The analysis plug-ins provides several portlets with user configurable width and height. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice).

          (The same would be good for the height, too. Here at least a default height would be nice to have. However, the actual height should be overwritable by the user in the portlet configuration.)
          The analysis plug-ins provides several portlets with user configurable width and height. Since the width of a portlet depends on the screen resolution and the number of columns it would be nice if the default width for a portlet graph would be available as a variable in the jelly scripts (at least a default width for single or double column display would be nice).

          (The same would be good for the height, too. Here at least a default height would be nice to have.)
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 136307 ] JNJira + In-Review [ 174482 ]

            People

            • Assignee:
              petehayes Peter Hayes
              Reporter:
              drulli Ulli Hafner
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: