Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unstable job portlet to properly display items inside folders. #22

Merged
merged 2 commits into from
Jan 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.509.1</version>
<version>1.509.4</version>
</parent>
<artifactId>dashboard-view</artifactId>
<packaging>hpi</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package hudson.plugins.view.dashboard.core;

import hudson.Extension;
import hudson.model.Descriptor;
import hudson.model.Job;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TopLevelItem;
import hudson.model.*;
import hudson.plugins.view.dashboard.DashboardPortlet;
import hudson.views.JobColumn;
import hudson.views.ListViewColumn;
Expand Down Expand Up @@ -46,6 +42,9 @@ public Collection<Job> getUnstableJobs(Collection<TopLevelItem> allJobs) {
ArrayList<Job> unstableJobs = new ArrayList<Job>();

for (TopLevelItem item : allJobs) {
if (item instanceof ItemGroup) {
unstableJobs.addAll(getUnstableJobs(((ItemGroup)item).getItems()));
}
if (item instanceof Job) {
Job job = (Job) item;
Run run = job.getLastCompletedBuild();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ THE SOFTWARE.
<j:forEach var="job" items="${unstableJobs}">
<tr><td style="${indenter.getCss(j)}; border: 1px solid #BBBBBB">
<j:if test="${job.buildable and job.hasPermission(job.BUILD)}">
<a href="${job.shortUrl}build?delay=0sec">
<a href="${job.url}build?delay=0sec">
<img src="${imagesURL}/16x16/clock.png"
title="${%Schedule a build}" alt="${%Schedule a build}"
border="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<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">
<st:documentation>
Generates a link to a job - same as lib/hudson/jobLink except uses job short url
Generates a link to a job - same as lib/hudson/jobLink except uses job long url
<st:attribute name="job" type="hudson.model.Job" use="required">
Job object to be displayed.
</st:attribute>
Expand All @@ -39,5 +39,5 @@ THE SOFTWARE.
alt="${job.buildHealth.description}"
title="${job.buildHealth.description}" />
<!--t:jobLink job="${job}"/-->
<a href="${job.shortUrl}" class="model-link">${job.displayName}</a>
<a href="${job.url}" class="model-link">${job.fullDisplayName}</a>
</j:jelly>