Class BluePageDecorator

java.lang.Object
io.jenkins.blueocean.BluePageDecorator
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
PageStatePreloadDecorator

public abstract class BluePageDecorator extends Object implements ExtensionPoint
Participates in the rendering of HTML pages for all pages of Hudson.

This class provides a few hooks to augment the HTML generation process of Hudson, across all the HTML pages that Hudson delivers.

For example, if you'd like to add a Google Analytics stat to Hudson, then you need to inject a small script fragment to all Hudson pages. This extension point provides a means to do that.

Life-cycle

Plugins that contribute this extension point should implement a new decorator and put Extension on the class.

Associated Views

header.jelly

This page is added right before the </head> tag. Convenient place for additional stylesheet, <meta> tags, etc.

 <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
     <script>
         //your JS code
     </script>
 </j:jelly>
 

httpHeaders.jelly

For example, this httpHeader.jelly adds HTTP X-MY-HEADER

 <?jelly escape-by-default='true'?>
 <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
    <st:header name="X-MY-HEADER" value="${it.someValue}"/>
 </j:jelly>

 

This is a generalization of the X-Jenkins header that aids auto-discovery. This fragment can write additional <st:header name="..." value="..." /> tags that go along with it.

Author:
Vivek Pandey