Package io.jenkins.plugins.reporter
Class ReportDetails
- java.lang.Object
-
- io.jenkins.plugins.reporter.ReportDetails
-
- All Implemented Interfaces:
ModelObject
public class ReportDetails extends Object implements ModelObject
-
-
Constructor Summary
Constructors Constructor Description ReportDetails(Run<?,?> owner, String url, ReportResult result, String displayName, Item item, Optional<ReportDetails> parentViewModel)
Creates a new instance ofReportDetails
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBuildTrend(String configuration)
Returns the UI model for an ECharts line chart that shows the item result.String
getDisplayName()
Object
getDynamic(String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Returns a new sub page for the selected link.Collection<String>
getErrorMessages()
Returns the error messages of the static analysis run.Collection<String>
getInfoMessages()
Returns the information messages of the static analysis run.Item
getItem()
String
getItemPieChartModel()
Returns the UI model for an ECharts item data chart.Run<?,?>
getOwner()
Returns the build as owner of this object.Optional<ReportDetails>
getPrevious()
Get the view model of parent item.ItemTableModel
getTableModel()
Returns the UI model for the specified table.String
getUrl()
Returns the (relative) URL of this model object.String
getUrlForBuild(String build, String detailsUrl)
Returns the URL for same results of the selected build.
-
-
-
Constructor Detail
-
ReportDetails
public ReportDetails(Run<?,?> owner, String url, ReportResult result, String displayName, Item item, Optional<ReportDetails> parentViewModel)
Creates a new instance ofReportDetails
.- Parameters:
owner
- the associated build/run of this viewurl
- the relative URL of this viewresult
- the report resultdisplayName
- the human-readable name of this view (shown in breadcrumb).item
- the item to show for this view.parentViewModel
- the view model of parent item.
-
-
Method Detail
-
getErrorMessages
public Collection<String> getErrorMessages()
Returns the error messages of the static analysis run.- Returns:
- the error messages
-
getInfoMessages
public Collection<String> getInfoMessages()
Returns the information messages of the static analysis run.- Returns:
- the information messages
-
getItem
public Item getItem()
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
-
getOwner
public final Run<?,?> getOwner()
Returns the build as owner of this object.- Returns:
- the owner
-
getUrl
public String getUrl()
Returns the (relative) URL of this model object.- Returns:
- this model objects' URL
-
getPrevious
public Optional<ReportDetails> getPrevious()
Get the view model of parent item.- Returns:
- the view model of parent item.
-
getItemPieChartModel
public String getItemPieChartModel()
Returns the UI model for an ECharts item data chart.- Returns:
- the UI model as JSON
-
getTableModel
public ItemTableModel getTableModel()
Returns the UI model for the specified table.- Returns:
- the UI model as JSON
-
getBuildTrend
@JavaScriptMethod public String getBuildTrend(String configuration)
Returns the UI model for an ECharts line chart that shows the item result.- Parameters:
configuration
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getUrlForBuild
@JavaScriptMethod public String getUrlForBuild(String build, String detailsUrl)
Returns the URL for same results of the selected build.- Parameters:
build
- the selected build to open the new results fordetailsUrl
- the absolute URL to this details view report- Returns:
- the URL to the report or an empty string if the report are not available
-
getDynamic
public Object getDynamic(String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
Returns a new sub page for the selected link.- Parameters:
link
- the link to identify the sub page to showrequest
- Stapler requestresponse
- Stapler response- Returns:
- the new sub page
-
-