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

Make build description in build history widget configurable or possible to hide

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins ver. 2.205, reproduced in browsers Chrome stable, Firefox and Edge Beta (insider preview)
    • Jenkins 2.223

      This relates to JENKINS-19760 and JENKINS-31209 resolved by https://github.com/jenkinsci/jenkins/pull/4209 where build description in build history widget is no longer truncated. A regression of this is that for elaborate build descriptions the build history widget becomes unusable.

      The change did not sit well with our organization as our build descriptions are quite extensive. We use groovy code to parse log output which results in a big html blob containing details about versions, servers, errors, warns git commit and details, related jira issues etc. This html is then used as build description which results in nice reports when the user views the job details:

      The issue after the change related to JENKINS-19760 and JENKINS-31209 is that this full html report is also displayed in the build history widget which practically makes the widget unusable:

      Possible solutions:

      • Have truncation length (maxDescrLength) configurable.
      • Possibility to hide build description in build history widget.

          [JENKINS-60299] Make build description in build history widget configurable or possible to hide

          Peder Schmedling created issue -
          Peder Schmedling made changes -
          Description Original: This relates to JENKINS-19760 and JENKINS-31209 resolved by [https://github.com/jenkinsci/jenkins/pull/4209] where build description in build history widget is no longer truncated. A regression of this is that for elaborate build descriptions the build history widget becomes unusable.

          The change did not sit well with our organization as our build descriptions are quite extensive. We use groovy code to parse log output which results in a big html blob containing details about versions, servers, errors, warns git commit and details, related jira issues etc. This html is then used as build description which results in nice reports when the user views the job details:

          !image-2019-11-27-12-00-28-106.png|thumnail!

          The issue after the change realted to JENKINS-19760 and JENKINS-31209 is that this full html report is also displayed in the build history widget:

          !image-2019-11-27-12-01-21-459.png|thumnail!

          Possible solutions:
          - Have truncation length ({{maxDescrLength}}) configurable.
          - Possibility to hide build description in build history widget.
          New: This relates to JENKINS-19760 and JENKINS-31209 resolved by [https://github.com/jenkinsci/jenkins/pull/4209] where build description in build history widget is no longer truncated. A regression of this is that for elaborate build descriptions the build history widget becomes unusable.

          The change did not sit well with our organization as our build descriptions are quite extensive. We use groovy code to parse log output which results in a big html blob containing details about versions, servers, errors, warns git commit and details, related jira issues etc. This html is then used as build description which results in nice reports when the user views the job details:

           !image-2019-11-27-12-00-28-106.png|thumbnail!

          The issue after the change realted to JENKINS-19760 and JENKINS-31209 is that this full html report is also displayed in the build history widget:

           !image-2019-11-27-12-01-21-459.png|thumbnail!

          Possible solutions:
          - Have truncation length ({{maxDescrLength}}) configurable.
          - Possibility to hide build description in build history widget.
          Peder Schmedling made changes -
          Description Original: This relates to JENKINS-19760 and JENKINS-31209 resolved by [https://github.com/jenkinsci/jenkins/pull/4209] where build description in build history widget is no longer truncated. A regression of this is that for elaborate build descriptions the build history widget becomes unusable.

          The change did not sit well with our organization as our build descriptions are quite extensive. We use groovy code to parse log output which results in a big html blob containing details about versions, servers, errors, warns git commit and details, related jira issues etc. This html is then used as build description which results in nice reports when the user views the job details:

           !image-2019-11-27-12-00-28-106.png|thumbnail!

          The issue after the change realted to JENKINS-19760 and JENKINS-31209 is that this full html report is also displayed in the build history widget:

           !image-2019-11-27-12-01-21-459.png|thumbnail!

          Possible solutions:
          - Have truncation length ({{maxDescrLength}}) configurable.
          - Possibility to hide build description in build history widget.
          New: This relates to JENKINS-19760 and JENKINS-31209 resolved by [https://github.com/jenkinsci/jenkins/pull/4209] where build description in build history widget is no longer truncated. A regression of this is that for elaborate build descriptions the build history widget becomes unusable.

          The change did not sit well with our organization as our build descriptions are quite extensive. We use groovy code to parse log output which results in a big html blob containing details about versions, servers, errors, warns git commit and details, related jira issues etc. This html is then used as build description which results in nice reports when the user views the job details:

           !image-2019-11-27-12-00-28-106.png|thumbnail!

          The issue after the change related to JENKINS-19760 and JENKINS-31209 is that this full html report is also displayed in the build history widget which practically makes the widget unusable:

           !image-2019-11-27-12-01-21-459.png|thumbnail!

          Possible solutions:
          - Have truncation length ({{maxDescrLength}}) configurable.
          - Possibility to hide build description in build history widget.
          Daniel Beck made changes -
          Labels New: lts-candidate

          Daniel Beck added a comment -

          Perhaps auto-hide a description if its rendered size would be too big? I.e. do not introduce a new option, but do the right thing based on content?

          Is this feasible?

          Daniel Beck added a comment - Perhaps auto-hide a description if its rendered size would be too big? I.e. do not introduce a new option, but do the right thing based on content? Is this feasible?

          Sounds good to me. I have no idea what the general use case is but for our use case auto hide would suffice

          Peder Schmedling added a comment - Sounds good to me. I have no idea what the general use case is but for our use case auto hide would suffice

          A possible workaround for those interested:

          1. Install Simple theme plugin
          2. Go to "Manage Jenkins" > "Configure System" > "Theme"
          3. Add "Extra CSS" with the following content:
            .cards_container.zws-inserted {
                display:none;
            }
            

          Peder Schmedling added a comment - A possible workaround for those interested: Install Simple theme plugin Go to "Manage Jenkins" > "Configure System" > "Theme" Add "Extra CSS" with the following content: .cards_container.zws-inserted { display :none; }
          Josh Soref made changes -
          Attachment New: image-2020-02-06-14-37-27-125.png [ 50147 ]

          Josh Soref added a comment -

          You could use this:

          td.build-row-cell > div > .build-link {
           background-color: pink;
           max-height: 3em;
           overflow-y: hidden;
          }
          td.build-row-cell > div.desc {
           background-color: yellow;
           max-height: 5em;
           overflow-y: hidden;
          }
          

          The coloring is included just to make it easy to identify the pieces.

          Personally, I think having some default css with some em based limits for both fields would be nice.

          I like including stack traces or similar in the second field, and the behavior we got wasn't particularly ideal.

          Josh Soref added a comment - You could use this: td.build-row-cell > div > .build-link { background-color: pink; max-height: 3em; overflow-y: hidden; } td.build-row-cell > div.desc { background-color: yellow; max-height: 5em; overflow-y: hidden; } The coloring is included just to make it easy to identify the pieces. Personally, I think having some default css with some em based limits for both fields would be nice. I like including stack traces or similar in the second field, and the behavior we got wasn't particularly ideal.

          Harry G. added a comment - - edited

          Thanks a lot! For me at first this didn't work, as our description contains html tables and still breaks out in width.
          So I added max-with which then works for me for desktop (probably not perfect for mobile)

          td.build-row-cell > div > .build-link {
           max-height: 3em;
           max-width: 320px;
            overflow-y: hidden;
          }
          td.build-row-cell > div.desc {
           max-height: 5em;
           max-width: 320px;
           overflow-y: hidden;
          }

          What remains is the high loading time, in my example few minutes on FF and more on Chrome, forever on IE.

           

          Harry G. added a comment - - edited Thanks a lot! For me at first this didn't work, as our description contains html tables and still breaks out in width. So I added max-with which then works for me for desktop (probably not perfect for mobile) td.build-row-cell > div > .build-link {  max-height: 3em;  max-width: 320px;   overflow-y: hidden; } td.build-row-cell > div.desc {  max-height: 5em;  max-width: 320px;  overflow-y: hidden; } What remains is the high loading time, in my example few minutes on FF and more on Chrome, forever on IE.  

            oleg_nenashev Oleg Nenashev
            peder_dsb Peder Schmedling
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: