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

Blue Ocean support for ANSI Color output

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It appears that the ANSI Color plugin currently does not work with the Blue Ocean UX. We're expecting to see shell output which is colored but it's not. I am not sure if it would be up to the Blue Ocean plugin team or the ANSI color plugin team to resolve this so I mapped both components to it. Please feel free to edit this ticket as needed. By the way, we're using the pipeline syntax for generating the output.

      I've read the guidelines for ticket creation and searched for similar issues and was unable to find any. Having said this, please let me know if there is something wrong with this ticket or if this is a known issue. Also, I was not sure which sprint to add this to so I left it blank.

      Thanks!

        Attachments

          Activity

          Hide
          lewiscowles1986 Lewis Cowles added a comment -

          Looking at the code, I'd be surprised if the markup did not exist and was not just having styles overridden. Can anyone produce attachment the output as HTML of a part of the log (redacted if necessary)? should be as simple as selecting with mouse, right-click and "copy as HTML". This way we can know if it's failing to parse the text or if it's a front-end glitch.

          Show
          lewiscowles1986 Lewis Cowles added a comment - Looking at the code, I'd be surprised if the markup did not exist and was not just having styles overridden. Can anyone produce attachment the output as HTML of a part of the log (redacted if necessary)? should be as simple as selecting with mouse, right-click and "copy as HTML". This way we can know if it's failing to parse the text or if it's a front-end glitch.
          Hide
          evasilchenko Eugene Vasilchenko added a comment -

          Lewis Cowles it appears to be a front-end issue. I picked a random output line from a Chef command which appears green in the legacy UX but is indistinguishable from the rest of the output in Blue Ocean:

          Jenkins Console Output:

          <span style="color: #00CD00;">- restart service service[httpd]</span>
          

          Jenkins Blue Ocean Console Output

          <tr id="step-134-log-524">
            <td class="linenumber">
              <a href="#step-134-log-524" name="step-134-log-524">524</a>
              <!-- react-text: 4068 --> 
              <!-- /react-text -->
            </td>
            <td class="line"> - restart service service[httpd]</td>
          </tr>
          

          If I manually add the inline style to the td with class="line" it overrides the styling from this .line class and works. There might need to be an update made to the plugin however, because I don't see any reference to the green style in the CSS hierarchy for the <tr> node at all.

          Show
          evasilchenko Eugene Vasilchenko added a comment - Lewis Cowles it appears to be a front-end issue. I picked a random output line from a Chef command which appears green in the legacy UX but is indistinguishable from the rest of the output in Blue Ocean: Jenkins Console Output: <span style= "color: #00CD00;" > - restart service service[httpd] </span> Jenkins Blue Ocean Console Output <tr id= "step-134-log-524" > <td class= "linenumber" > <a href= "#step-134-log-524" name= "step-134-log-524" > 524 </a> <!-- react-text: 4068 --> <!-- /react-text --> </td> <td class= "line" > - restart service service[httpd] </td> </tr> If I manually add the inline style to the td with class="line" it overrides the styling from this .line class and works. There might need to be an update made to the plugin however, because I don't see any reference to the green style in the CSS hierarchy for the <tr> node at all.
          Hide
          lewiscowles1986 Lewis Cowles added a comment -

          Looking at this, I'm not sure it is a front-end issue. Forcing inline style changes is probably not the way forward the specific td needs a style tag appended to it by the looks of things.

          Show
          lewiscowles1986 Lewis Cowles added a comment - Looking at this, I'm not sure it is a front-end issue. Forcing inline style changes is probably not the way forward the specific td needs a style tag appended to it by the looks of things.
          Hide
          jamesdumay James Dumay added a comment -

          Lewis Cowles I think you will find we have to add an extension point in blueocean-rest-impl for the ansi color plugin to pass that color info up into the response and then some sort of decorator extension point in the JS

          Show
          jamesdumay James Dumay added a comment - Lewis Cowles I think you will find we have to add an extension point in blueocean-rest-impl for the ansi color plugin to pass that color info up into the response and then some sort of decorator extension point in the JS
          Hide
          jamesdumay James Dumay added a comment -

          It is likely that we would like to support ANSI Color right out of the box with JENKINS-41200.

          Show
          jamesdumay James Dumay added a comment - It is likely that we would like to support ANSI Color right out of the box with JENKINS-41200 .

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            evasilchenko Eugene Vasilchenko
            Votes:
            2 Vote for this issue
            Watchers:
            17 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: