Class SonargraphIntegrationAction
- java.lang.Object
-
- com.hello2morrow.sonargraph.integration.jenkins.controller.SonargraphIntegrationAction
-
- All Implemented Interfaces:
hudson.model.Action
,hudson.model.ModelObject
,hudson.model.ProminentProjectAction
public class SonargraphIntegrationAction extends Object implements hudson.model.ProminentProjectAction
This object is the responsible of managing the action that will take the user to see the graphs generated by sonargraph.- Author:
- esteban
-
-
Constructor Summary
Constructors Constructor Description SonargraphIntegrationAction(hudson.model.Job<?,?> job, List<String> selectedMetrics, MetricIds metricMetaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doGetPlot(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Method that generates the chart and adds it to the response object to allow jenkins to display it.Collection<String>
getChartsForMetrics()
String
getDiffURL()
Diff URL is used as html href for "Show most recent Sonargraph Diff" in SonargraphIntegrationAction/index.jelly.String
getDisplayName()
Name of the link for this actionString
getIconFileName()
Icon that will appear next to the link defined by this action.hudson.model.Job<?,?>
getJob()
String
getReportURL()
Report URL is used as html href for "Show most recent Sonargraph Report" in SonargraphIntegrationAction/index.jelly.String
getUrlName()
Last segment of the url that will lead to this action. e.g https://localhost:8080/jobName/sonargraph
-
-
-
Method Detail
-
getChartsForMetrics
public Collection<String> getChartsForMetrics()
-
doGetPlot
public void doGetPlot(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Method that generates the chart and adds it to the response object to allow jenkins to display it. It is called in SonargraphChartAction/index.jelly in the src attribute of an img tag.
-
getJob
public hudson.model.Job<?,?> getJob()
-
getIconFileName
public String getIconFileName()
Icon that will appear next to the link defined by this action.- Specified by:
getIconFileName
in interfacehudson.model.Action
-
getDisplayName
public String getDisplayName()
Name of the link for this action- Specified by:
getDisplayName
in interfacehudson.model.Action
- Specified by:
getDisplayName
in interfacehudson.model.ModelObject
-
getUrlName
public String getUrlName()
Last segment of the url that will lead to this action. e.g https://localhost:8080/jobName/sonargraph- Specified by:
getUrlName
in interfacehudson.model.Action
-
getReportURL
public String getReportURL()
Report URL is used as html href for "Show most recent Sonargraph Report" in SonargraphIntegrationAction/index.jelly. Depends on global Jenkins URL being set correctly in Jenkins. Otherwise a relative path is used, which may work or not.- Returns:
- the absolute or relative url/path for the most recent sonargraph report.
-
getDiffURL
public String getDiffURL()
Diff URL is used as html href for "Show most recent Sonargraph Diff" in SonargraphIntegrationAction/index.jelly. Depends on global Jenkins URL being set correctly in Jenkins. Otherwise a relative path is used, which may work or not.- Returns:
- the absolute or relative url/path for the most recent sonargraph diff.
-
-