Sectioned View Plugin

Plugin Information

Plugin ID sectioned-view
Latest Release 1.16-h-1
Latest Release Date Mar 25, 2013
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

Sectioned View Plugin

This plugin provides a new view implementation that can be divided into sections. Each section can display different information about the selected jobs. An extension point is also provided to define new types of sections.

New homepage
The Sectioned View Plugin is now being maintained at the Jenkins site. Please submit all questions, patches, and issues there. It should still be compatible with Hudson installs unless otherwise noted.


Description

Using this plugin you can combine different types of sections to create a view that is tailored to your needs. Each section can contain different jobs and can have an optional header.

The sections currently implemented are:

  • Test Result Section
  • Standard List View Section
  • Job Graphs Section (first implementation released in version 1.2)
    • currently only supports these trends: Test Result, Compiler Warnings, Violations
  • Text Section (no jobs, just a textbox)
  • View Listing Section
    • A great way to make a home screen for listing all your different views
    • Supports the Nested View Plugin for hierarchical views.

You can add as many different sections as you want to create an overview of various projects.

For each section you can specify a width (Full, 1/2, 1/3, 2/3) and a position (Center, Left, Right).

Example:

Configuration

After installing the plugin you'll see "Sectioned View" as an option when creating a new view.

When editing the view, you get a new area for creating and organising your sections. Each section can be further configured by expanding its "Advanced" area.

View Listing Section Configuration

The View Listing Section type presents a listing of all your views (as an expandable tree if you're using the Nested View Plugin).
Just check the ones you want to show in the listing. Any checked entries will be given a box in the listing.

If you use nested views, then all sub-views of a checked view will be displayed as a hierarchical unordered list in the box (see the "Projects" listing in the example pic above).

Extensions

New section types can be implemented by extending SectionedViewSection as shown below.

public class MyCustomViewSection extends SectionedViewSection {

    @DataBoundConstructor
    public MyCustomViewSection(String name) {
        super(name);
    }

    @Extension
    public static final class DescriptorImpl extends SectionedViewSectionDescriptor {

        @Override
        public String getDisplayName() {
            return "My Custom Section";
        }
    }
}

Then you can create a matching jelly include for displaying the jobs in this section.

<j:jelly xmlns...>
  <j:if test="${section.name.length() > 0}">
    <h2>${section.name}</h2>
  </j:if>
  <j:if test="${empty(section.items)}">
    <p>No jobs in this section.</p>
  </j:if>
  <j:forEach var="job" items="${section.items}">
    <!-- Some custom logic for how to display each job -->
  </j:forEach>
</j:jelly>

ToDo

In no particular order:

  • Allow configuration of columns in list section (same as in the standard list view)
    • Done - available in release 1.5 - Requires Hudson 1.329 or higher
  • Add security matrix for each view (like Project-Based Matrix Security) - not sure about this one. I think just using the existing project-based security matrix would be better. The sections just need to respect those permissions. See the other to-do item on this topic.
  • Add a full-screen link to display view without the sidebar.
  • Add support for more graph types in the Job Graphs Section
  • Jobs should respect project-specific security settings.
    • If the logged in user does not have read access to a job it shouldn't appear in the section
    • If no jobs in a section are viewable by the logged in user then the whole section should not be displayed.
  • Allow Text Sections to be easily styled/themed
    • Done - Simple styling options available since the 1.8 release

Work In Progress

Update: first implementation released in version 1.2

Job Graphs Section - a section that presents a mini overview of all the trend reports for the selected jobs.

Changelog

Release 1.13 - 13 Dec 2010

  • Built against Hudson 1.388
  • Applied patch for HUDSON-8276 - Added ability to use View Job Filters on all Sectioned View Sections.

Release 1.12 - 1 Nov 2010

  • Requires Hudson 1.377 or higher
  • Added a new section type for displaying a listing of selected views. Supports the Nested View Plugin for hierarchical views.

Release 1.11 - 15 Jun 2010

  • Requires Hudson 1.345 or higher
  • Made job names clickable when configuring sections
  • Some community-contributed localizations
  • Added support for labelled test group graphs in Test Result and Job Graphs sections (see LabeledTestGroupsPublisher Plugin)

Release 1.10 - 23 Feb 2010

  • Fixed url to compiler warnings trend graph when using a newer version of the Warnings Plugin - HUDSON-5725
    • Note: this version will now fail to display the warnings when used with older versions of the Warnings Plugin
  • Added some new graphs to Job Graphs Section
    • Open Tasks trend
    • Static Analysis combined trend

Release 1.9 - 22 Feb 2010

  • Added a Tip style option to the Text Section (to match the style of the confluence tip macro)
  • Integrated some French community-contributed translations

Release 1.8 - 28 Jan 2010

  • Added an option for selecting a Text Section's style (currently just note/info/warning style)
  • Newly added List View Sections now contain the standard columns by default

Release 1.7 - 23 Jan 2010

  • Requires Hudson 1.342 or higher
  • Fix 1.342 hudson core compatibility

Release 1.6

  • Fixed HUDSON-4844 - Sectioned View in "My Views" now shows the correct tabs.

Release 1.5

  • Requires Hudson 1.329 or higher
  • Added ability to configure columns in List View Section just like in the standard List View

Release 1.4

  • Fixed table layout on configuration page
  • Added violation graph support for Freestyle projects to the Job Graphs Section

Release 1.3

  • Added "Text Section" type
  • Added section width and positioning settings

Release 1.2

  • Support for regex-based job includes for each section
  • First implementation of "Job Graphs Section" type

Release 1.1 (release failed, skipping this version)

Release 1.0

  • Initial release.
  • Implemented "Test Result Section" and standard "List View Section"

Labels:

plugin-ui plugin-ui Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. May 15, 2009

    Ricardo Oliveira says:

    Really very nice idea for a view that can display important information. Questi...

    Really very nice idea for a view that can display important information.

    Questions:
    Does it support matrix-based projects?
    How do you re-order the projects in the Test-result section?

    Thank you!

    1. May 17, 2009

      Timothy Bingaman says:

      Thanks I can't think of a reason that matrix-based projects wouldn't work... b...

      Thanks

      I can't think of a reason that matrix-based projects wouldn't work... but I haven't tried so no guarantees.

      Changing the order of projects within a section is currently not supported. They are sorted alphabetically like in the standard list view.

      cheers,
      Timo

      1. May 25, 2009

        Ricardo Oliveira says:

        Hi there, I have been looking at your code... Matrix projects cannot be treated...

        Hi there,

        I have been looking at your code...
        Matrix projects cannot be treated like 'free-style projects', because they don't have the same base class.
        Also, matrix-projects do not have a high-level test result. You need to drill into it's configurations to retrieve them, but I believe that no graphical test result is generated...

        Thanks,

        1. May 28, 2009

          Timothy Bingaman says:

          Hey Ricardo, thanks for looking into that.  I guess that would be a NO the...

          Hey Ricardo,

          thanks for looking into that.  I guess that would be a NO then for matrix project support.

          We don't use any matrix-based projects where I work at the moment and I'm probably not going to get time to set any up.  If you or someone else who uses matrix projects wanted to try to get this working for them, please feel free to check out the code and work with it.

          This plugin as it is now does more or less what I wanted it to and my time to play with it has become quite limited unfortunately.

  2. Jun 22, 2009

    Nicholas Hahn says:

    This plug-in is absolutely awesome - I can see my homepage looking a lot better ...

    This plug-in is absolutely awesome - I can see my homepage looking a lot better now.

    Is anyone up for adding support for FindBugs/Compiler Warnings/Emma/Open Tasks/etc ?  Would be awesome if we could have a snapshot of all graphs by project.

    1. Jun 22, 2009

      Timothy Bingaman says:

      Glad you like it I haven't had much time to work on it recently (I've got the ...

      Glad you like it

      I haven't had much time to work on it recently (I've got the regex support done locally, but not checked in yet, hopefully commit that soon).
      Was trying to get the column configuration added to the list view section, but running into some problems with that.

      If I find some more time I'll certainly try to add those graphs you suggested.  Of course, if anyone else wants to create new Section types, please feel free to do so!

      cheers,
      Timo

  3. Jul 06, 2009

    Christian Hartmann says:

    Hi there, I like to write some extensions for other graphs. However, how can I...

    Hi there,

    I like to write some extensions for other graphs.

    However, how can I get your source-code?

    Regards,

    Christian

    1. Jul 06, 2009

      Timothy Bingaman says:

      Source code is in the Hudson repo. View: http://fisheye4.atlassian.com/browse/h...
      1. Jul 07, 2009

        Christian Hartmann says:

        Well, first of all, thanks for your help. I've simply tried to modify the main....

        Well, first of all, thanks for your help.

        I've simply tried to modify the main.jelly under the TestResultViewSection. However, it seems Hudson can only handle one lazymap information, since only the first <img> is clickable correctly. All the other images for checkstyle, findbugs, etc. are displayed correctly, but are not clickable correctly using the same syntax within a the <j:forEach>-loop.

        So, this seems to be the problem. Since I am not very familiar with the hudson-javascript I decided to make the images not clickable.

        Here is my current used main.jelly:

        main.jelly
        <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
        <j:if test="${section.name.length() > 0}">
        </j:if>
                       <j:if test="${empty(section.items)}">
                         <p>No jobs in this section.</p>
                       </j:if>
                       <j:forEach var="job" items="${section.items}">
                         <div style="float: left; margin: 0px 0px 5px 10px;">
                           <j:set var="jobName" value="${job.displayName}"/>
                           <h3><a href="${job.shortUrl}">${jobName.length() > 33 ? jobName.substring(0, 15) + "..." + jobName.substring(jobName.length() - 15) : jobName}</a></h3>
                           <j:set var="tr" value="${job.lastSuccessfulBuild.testResultAction}"/>
                           <j:choose>
                             <j:when test="${tr==null}">
                               <p>No tests results to display.</p>
                             </j:when>
                             <j:otherwise>
                               <j:choose>
                                 <j:when test="${tr.previousResult==null}">
                                   <!-- at least two data points are required for a trend report -->
                                   <p>Not enough runs to display trend.</p>
                                 </j:when>
                                 <j:otherwise>
                                   <table>
                                     <tr>
                                       <td>Tests</td><td>Offene Punkte</td><td>Findbugs</td>
                                     </tr>
                                     <tr>
                                       <td><img src="${job.shortUrl}test/trend?width=250&amp;height=100" alt="[Test result trend chart]"/></td><td><img src="${job.shortUrl}tasks/trend?width=250&amp;height=100" alt="[Offene Punkte]"/></td><td><img src="${job.shortUrl}findbugs/trend?width=250&amp;height=100"
        alt="[Findbugs]"/></td>
                                     </tr>
                                     <tr>
                                       <td>Checkstyle</td><td>Don't Repeat Yourself</td><td>Compiler Warnings</td>
                                     </tr>
                                     <tr>
                                       <td><img src="${job.shortUrl}checkstyle/trend?width=250&amp;height=100" alt="[Checkstyle]"/></td><td><img src="${job.shortUrl}dry/trend?width=250&amp;height=100" alt="[Don't Repeat Yourself]"/></td><td><img src="${job.shortUrl}warnings/trend?width=250&amp;height=100" alt="[Compiler Warnings]"/></td>
                                     </tr>
                                   </table>
                                </j:otherwise>
                               </j:choose>
                             </j:otherwise>
                           </j:choose>
                         </div>
                       </j:forEach>
        </j:jelly>
        

        Does anybody know how to handle the lazymap information properly?

        1. Jul 12, 2009

          Timothy Bingaman says:

          It may also be that some plugins simply don't have a trend map available. For w...

          It may also be that some plugins simply don't have a trend map available.

          For what you're trying to do though, you may want to check out the new version (1.2) that I just released.
          It includes a new section type "Job Graphs Section" that provides a first attempt at displaying multiple graphs per job.

          1. Sep 08, 2009

            Christian Zotter says:

            Hi Timothy, I love this "Job Graphs Section", because it gives an graphical ov...

            Hi Timothy,

            I love this "Job Graphs Section", because it gives an graphical overview of all selected projects and a good comparison!
            But will it support also Trend graphs for JavaNCSS, Findbugs and Checkstyle? Because they are not shown in this view.

            Thanks, Christian

            1. Sep 14, 2009

              Timothy Bingaman says:

              Not at the moment. I've been trying to come up with a better way of implementin...

              Not at the moment. I've been trying to come up with a better way of implementing the different mini-graphs to make them more pluggable, but so far all the solutions are fairly complicated. Currently, I've just been bundling a custom jelly view for only a couple different graph types (the way each plugin generates its trend graph is slightly different). I'll try to add some more when I get time.

  4. Aug 03, 2009

    Karl Baum says:

    How do you add a view within hudson?  I installed this plugin but I don't s...

    How do you add a view within hudson?  I installed this plugin but I don't see the option.

    thx.

    1. Aug 03, 2009

      Timothy Bingaman says:

      After the plugin is installed (and Hudson has been restarted), click on the [+] ...

      After the plugin is installed (and Hudson has been restarted), click on the [+] at the right side of your existing view tabs.

      You should see "Sectioned View" as one of the options.

      If you don't see it there, go to Manage Hudson -> Manage Plugins -> Installed and verify that the SectionedView plugin is actually listed there.

      If it's still not working after that, let me know.

  5. Aug 06, 2009

    Lenny Reed says:

    For some reason I cant get violations to show in the Job graph section, only com...

    For some reason I cant get violations to show in the Job graph section, only compiler warnings, it states violations is supported.  I also have tasks, is there some way to get that in?  Finally, in the screen shots it looks like sections can contain sections...How is that done?

    Thanks,

    -lenny

    1. Aug 06, 2009

      Timothy Bingaman says:

      The Job Graphs section is still under development... I've only added a violation...

      The Job Graphs section is still under development... I've only added a violations graph for maven-based projects, sorry to be misleading. I'll add one for regular freestyle projects and create a new release soon.

      The nested sections are not really nested, just positioned differently. This is done using the positioning options added in version 1.3 of the plugin.
      To get something like in the screenshot:

      1. Create a job graphs section, select some jobs and set Align = "Right", Width = "1/3"
      2. Create a text section, paste in some text or html and set Align = "Left", Width = "2/3"
      3. Create a list view section, select some more jobs and set Align = "Center", Width = "Full"
      4. etc...

      Hope that helps

      cheers,
      Timo

    2. Aug 06, 2009

      Timothy Bingaman says:

      Just released version 1.4 If you upgrade, you should see the violations graph f...

      Just released version 1.4

      If you upgrade, you should see the violations graph for your Freestyle Projects now.

  6. Aug 25, 2009

    Kevin Trethewey says:

    Is there any way to show the View full screen? (ie Without the sidebar).

    Is there any way to show the View full screen? (ie Without the sidebar).

    1. Sep 14, 2009

      Timothy Bingaman says:

      Not at the moment, but I think it'd be pretty easy to do. I'll add this to my t...

      Not at the moment, but I think it'd be pretty easy to do.

      I'll add this to my todo list.

  7. Sep 28, 2009

    Mark Howard says:

    This is a fantastic plugin - we're now using it as our hudson home page. It wou...

    This is a fantastic plugin - we're now using it as our hudson home page.

    It would be great if we could have a few more sections types though, specifically:

    • Claim report from the claims plugin
    • Recently broken builds list
    • I broke the build -- the name or a picture of the person who committed the change that last broke any build.
    • CI game leader board
  8. Oct 26, 2009

    Julien Albert says:

    Nice plugin!! Hudson home page too :) The only black point for us is th...

    Nice plugin!! Hudson home page too :)

    The only black point for us is the lack of security. We have 20 projects which each contains 7jobs, so 20 sectioned view... An user, who has access to only jobs of 2 projects, can see all 20 views. Not very easy when the sectionned view which is interested you is the 3rd and 19th view (for example). It would be great for us to have this functionnality but I can understand that it is hard to find time to play with that such great plugin.

    Thanks for your work!

    1. Nov 02, 2009

      Timothy Bingaman says:

      Thanks I'll add the security stuff to my to-do list.

      Thanks

      I'll add the security stuff to my to-do list.

  9. Oct 30, 2009

    Brian J. Sayatovic says:

    Perhaps I'm missing something, but after I've added a new Sectioned View view, I...

    Perhaps I'm missing something, but after I've added a new Sectioned View view, I can't add any sections. I have a name and description followed by an "Add Section" button, but when I click it, it does nothing. Are there out-of-the-box sections, or do I have to create my own?

    1. Oct 30, 2009

      Brian J. Sayatovic says:

      FWIW, I upgrade from Hudson 1.327 to 1.330 and now it works: the "Add Section" b...

      FWIW, I upgrade from Hudson 1.327 to 1.330 and now it works: the "Add Section" button is now a drop-down button.

      1. Oct 30, 2009

        Timothy Bingaman says:

        Yah, the latest version of the plugin (1.5) has some features which depend on fi...

        Yah, the latest version of the plugin (1.5) has some features which depend on fixes in Hudson version 1.329. Previous versions of Hudson will fail to render the form properly.

        Apologies for any inconvenience, but I really wanted to add the ability to configure columns in the list view sections which wasn't possible to do in a nice way prior to a bugfix in Hudson 1.329.

  10. Jan 15, 2010

    oeuftete says:

    Not sure if this is a better place to get attention than JIRA (there's no sectio...

    Not sure if this is a better place to get attention than JIRA (there's no sectioned-view component there HUDSON-5109), but configuration of views seems quite broken in 1.5 with Hudson 1.337 (HUDSON-5108).

    1. Jan 14, 2010

      Timothy Bingaman says:

      Thanks for the report. I'm unable to duplicate the issue, looking into it furth...

      Thanks for the report. I'm unable to duplicate the issue, looking into it further.

      1. Jan 15, 2010

        Timothy Bingaman says:

        Already noted this in Jira, but I'll add it here as well: The issue occurred wh...

        Already noted this in Jira, but I'll add it here as well:

        The issue occurred when using the Claim plugin with the Sectioned View plugin. The Claim plugin lacked a workaround for a slightly awkward piece of code in Hudson core.

        Kohsuke has just fixed this in Hudson core so the workarounds are not required.

        Should be available in Hudson 1.342

  11. Feb 24, 2010

    Gustaf Lundh says:

    When using the text style templates, I think the background should have full wid...

    When using the text style templates, I think the background should have full width.

    For better symmetry and style - especially when using multiple columns.

    Is it OK if I commit a patch to change this behavior?

    Br

    Gustaf