Skip to content

Commit

Permalink
Fixed: JENKINS-23285 - All links on trend graph map are wrong on "tes…
Browse files Browse the repository at this point in the history
…tngreports" subpage
  • Loading branch information
nullin committed Jun 29, 2014
1 parent 694ddcc commit e8153d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README
Expand Up @@ -16,6 +16,9 @@ graph and all details about which tests that failed are also presented.
Release Notes
-------

### Upcoming
* Fixed: JENKINS-23285 - All links on trend graph map are wrong on "testngreports" subpage

### 1.6
* Fixed: JENKINS-19353 - Exception error message newlines are escaped
* Fixed: JENKINS-20968 - Doesn't resolve parameters in "TestNG XML report pattern" field
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/hudson/plugins/testng/util/GraphHelper.java
Expand Up @@ -46,8 +46,7 @@ public static void redirectWhenGraphUnsupported(StaplerResponse rsp, StaplerRequ
rsp.sendRedirect2(req.getContextPath() + "/images/headless.png");
}

public static JFreeChart createChart(StaplerRequest req, CategoryDataset dataset) {

public static JFreeChart createChart(final StaplerRequest req, CategoryDataset dataset) {
final JFreeChart chart = ChartFactory.createStackedAreaChart(
null, // chart title
null, // unused
Expand Down Expand Up @@ -88,7 +87,8 @@ public static JFreeChart createChart(StaplerRequest req, CategoryDataset dataset
@Override
public String generateURL(CategoryDataset dataset, int row, int column) {
NumberOnlyBuildLabel label = (NumberOnlyBuildLabel) dataset.getColumnKey(column);
return label.build.getNumber() + "/" + PluginImpl.URL + "/";
String path = req.getParameter("rel");
return (path == null ? "" : path) + label.build.getNumber() + "/" + PluginImpl.URL + "/";
}

@Override
Expand Down
Expand Up @@ -13,7 +13,7 @@ l.layout(title: "TestNG Results Trend") {

h1("TestNG Results Trends")
if (my.isGraphActive()) {
img(lazymap: "graphMap?rel=${my.project.lastCompletedBuild.upUrl}", alt: "[Test result trend chart]", src: "graph")
img(lazymap: "graphMap?rel=../", alt: "[Test result trend chart]", src: "graph")
} else {
p("Need at least 2 builds with results to show trend graph")
}
Expand Down

0 comments on commit e8153d0

Please sign in to comment.