Navigation Menu

Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[JENKINS-21723] Use relative links in trend graphs.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Feb 4, 2015
1 parent 3e382e2 commit cb09e77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
@@ -1,12 +1,11 @@
package hudson.plugins.analysis.graph;

import java.awt.Color;
import javax.annotation.CheckForNull;
import java.awt.*;
import java.util.Calendar;
import java.util.Collection;
import java.util.GregorianCalendar;

import javax.annotation.CheckForNull;

import org.apache.commons.lang.StringUtils;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
Expand All @@ -18,9 +17,8 @@
import org.jfree.data.xy.XYDataset;
import org.jfree.ui.RectangleInsets;

import hudson.plugins.analysis.core.ResultAction;
import hudson.plugins.analysis.core.BuildResult;

import hudson.plugins.analysis.core.ResultAction;
import hudson.util.Graph;

/**
Expand Down Expand Up @@ -87,7 +85,9 @@ public boolean isVisible() {
* Sets the root URL to the specified value.
*
* @param rootUrl the value to set
* @deprecated as of 1.68 relative links are created
*/
@Deprecated
public void setRootUrl(final String rootUrl) {
this.rootUrl = rootUrl;
}
Expand Down
@@ -1,29 +1,26 @@
package hudson.plugins.analysis.graph;

import javax.servlet.ServletException;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.servlet.ServletException;

import net.sf.json.JSONObject;

import org.apache.commons.lang.StringUtils;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;

import com.google.common.collect.Lists;

import hudson.model.ModelObject;
import net.sf.json.JSONObject;

import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;

import hudson.model.ModelObject;
import hudson.plugins.analysis.core.AbstractHealthDescriptor;
import hudson.plugins.analysis.core.BuildHistory;

import hudson.util.Graph;

/**
Expand Down Expand Up @@ -199,7 +196,6 @@ public Object getDynamic(final String graphId, final StaplerRequest request, fin
try {
BuildResultGraph graph = configuration.getGraph(graphId);
if (hasMeaningfulGraph()) {
graph.setRootUrl(project.getAbsoluteUrl());
if (graph.isVisible()) {
return graph.getGraph(-1, configuration, null, buildHistory.getBaseline());
}
Expand Down Expand Up @@ -345,9 +341,7 @@ public String getDayCountString() {
* @return the type
*/
public BuildResultGraph getGraphType() {
BuildResultGraph graphType = configuration.getGraphType();
graphType.setRootUrl(getOwner().getAbsoluteUrl());
return graphType;
return configuration.getGraphType();
}

/**
Expand Down

0 comments on commit cb09e77

Please sign in to comment.