Klasse JobAction
java.lang.Object
io.jenkins.plugins.analysis.core.model.JobAction
- Alle implementierten Schnittstellen:
Action
,ModelObject
,io.jenkins.plugins.echarts.AsyncConfigurableTrendChart
public class JobAction
extends Object
implements Action, io.jenkins.plugins.echarts.AsyncConfigurableTrendChart
A job action displays a link on the side panel of a job. This action also is responsible to render the historical
trend via its associated 'charts.jelly' view.
- Autor:
- Ullrich Hafner
-
Konstruktorübersicht
KonstruktorBeschreibungJobAction
(Job<?, ?> owner, StaticAnalysisLabelProvider labelProvider, int numberOfTools) Creates a new instance ofJobAction
.JobAction
(Job<?, ?> owner, StaticAnalysisLabelProvider labelProvider, int numberOfTools, TrendChartType trendChartType) Creates a new instance ofJobAction
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the build history for this job.void
doIndex
(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) Redirects the index page to the last result.getConfigurableBuildTrendModel
(String configuration) Returns the trend chart model that renders the build results for a specific action.Returns the icon URL for the side-panel in the job screen.getId()
Returns the ID of this action and the ID of the associated results.Returns the latest static analysis results for this job.Job
<?, ?> getOwner()
Returns the job this action belongs to.Returns the title of the trend graph.boolean
Returns whether the trend chart is empty.boolean
Returns whether the trend chart is visible or not.toString()
-
Konstruktordetails
-
JobAction
Creates a new instance ofJobAction
.- Parameter:
owner
- the job that owns this actionlabelProvider
- the label providernumberOfTools
- the number of tools that have results to show
-
JobAction
public JobAction(Job<?, ?> owner, StaticAnalysisLabelProvider labelProvider, int numberOfTools, TrendChartType trendChartType) Creates a new instance ofJobAction
.- Parameter:
owner
- the job that owns this actionlabelProvider
- the label providernumberOfTools
- the number of tools that have results to showtrendChartType
- determines if the trend chart will be shown
-
-
Methodendetails
-
getId
Returns the ID of this action and the ID of the associated results.- Gibt zurück:
- the ID
-
getDisplayName
- Angegeben von:
getDisplayName
in SchnittstelleAction
- Angegeben von:
getDisplayName
in SchnittstelleModelObject
-
getTrendName
Returns the title of the trend graph.- Gibt zurück:
- the title of the trend graph.
-
getOwner
Returns the job this action belongs to.- Gibt zurück:
- the job
-
createBuildHistory
Returns the build history for this job.- Gibt zurück:
- the history
-
getIconFileName
Returns the icon URL for the side-panel in the job screen. If there is no valid result yet, thennull
is returned.- Angegeben von:
getIconFileName
in SchnittstelleAction
- Gibt zurück:
- the icon URL for the side-panel in the job screen
-
getUrlName
- Angegeben von:
getUrlName
in SchnittstelleAction
-
doIndex
public void doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException Redirects the index page to the last result.- Parameter:
request
- Stapler requestresponse
- Stapler response- Löst aus:
IOException
- in case of an error
-
getLatestAction
Returns the latest static analysis results for this job.- Gibt zurück:
- the latest results (if available)
-
getConfigurableBuildTrendModel
Returns the trend chart model that renders the build results for a specific action.- Angegeben von:
getConfigurableBuildTrendModel
in Schnittstelleio.jenkins.plugins.echarts.AsyncConfigurableTrendChart
- Parameter:
configuration
- JSON configuration of the chart (number of builds, etc.)- Gibt zurück:
- the trend chart
-
isTrendVisible
public boolean isTrendVisible()Returns whether the trend chart is visible or not.- Angegeben von:
isTrendVisible
in Schnittstelleio.jenkins.plugins.echarts.AsyncConfigurableTrendChart
- Gibt zurück:
true
if the trend is visible, false otherwise
-
isTrendEmpty
public boolean isTrendEmpty()Returns whether the trend chart is empty. The trend is empty if all builds have zero issues.- Gibt zurück:
true
if the trend is empty, false otherwise
-
toString
-