Skip to content
This repository has been archived by the owner on Nov 14, 2017. It is now read-only.

Don't show broken image when no test results are available #7

Merged
merged 1 commit into from May 18, 2012
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/main/java/hudson/plugins/fitnesse/FitnesseProjectAction.java
Expand Up @@ -33,11 +33,21 @@ public String getUrlName() {
return "fitnesse";
}

/**
* Used in floatingBox.jelly
*/
public boolean hasTrend() {
return getLatestResults() != null;
}

/**
* Used in floatingBox.jelly
*/
public History getTrend() {
FitnesseResultsAction latestResults = getLatestResults();
if (latestResults == null) {
return null;
}
FitnesseResults result = latestResults.getResult();
return new History(result,500,200);
}
Expand Down
@@ -1,10 +1,13 @@
<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="${action.hasTrend()}">
<div class="test-trend-caption">
${%FitNesse Results Trend}
</div>
<div>
<img src="fitnesse/trend/countGraph/png" lazymap="fitnesse/trend/countGraph/map" alt="[FitNesse results trend chart]"/>
</div>
</j:if>
</j:jelly>