Class IssuesDetail
java.lang.Object
io.jenkins.plugins.datatables.DefaultAsyncTableContentProvider
io.jenkins.plugins.analysis.core.model.IssuesDetail
- All Implemented Interfaces:
ModelObject
,io.jenkins.plugins.datatables.AsyncTableContentProvider
- Direct Known Subclasses:
FixedWarningsDetail
public class IssuesDetail
extends io.jenkins.plugins.datatables.DefaultAsyncTableContentProvider
implements ModelObject
Build view that shows the details for a subset of issues.
- Author:
- Ullrich Hafner
-
Constructor Summary
ConstructorDescriptionIssuesDetail
(Run<?, ?> owner, AnalysisResult result, edu.hm.hafner.analysis.Report report, edu.hm.hafner.analysis.Report newIssues, edu.hm.hafner.analysis.Report outstandingIssues, edu.hm.hafner.analysis.Report fixedIssues, String displayName, String url, StaticAnalysisLabelProvider labelProvider, Charset sourceEncoding) Creates a new detail model with the corresponding viewIssuesDetail/index.jelly
.IssuesDetail
(Run<?, ?> owner, AnalysisResult result, edu.hm.hafner.analysis.Report report, edu.hm.hafner.analysis.Report newIssues, edu.hm.hafner.analysis.Report outstandingIssues, edu.hm.hafner.analysis.Report fixedIssues, String displayName, String url, StaticAnalysisLabelProvider labelProvider, Charset sourceEncoding, HealthDescriptor healthDescriptor) Creates a new detail model with the corresponding viewIssuesDetail/index.jelly
.IssuesDetail
(Run<?, ?> owner, AnalysisResult result, StaticAnalysisLabelProvider labelProvider, HealthDescriptor healthDescriptor, Charset sourceEncoding) Creates a new detail model with the corresponding viewIssuesDetail/index.jelly
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDisplayFile
(edu.hm.hafner.analysis.Issue issue) Returns whether the affected file of the specified issue can be shown in the UI.getApi()
Gets the remote API for this action.getBuildTrend
(String configuration) Returns the UI model for an ECharts line chart that shows the issues stacked by severity.getDetails
(String propertyName) Returns statics for the specified property.getDynamic
(String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) Returns a new subpage for the selected link.Returns the error messages of the static analysis run.getFileDisplayName
(edu.hm.hafner.analysis.Issue issue) Returns the short name for an absolute path name.edu.hm.hafner.analysis.Report
Returns all fixed issues of the associated static analysis run.getHealthTrend
(String configuration) Returns the UI model for an ECharts line chart that shows the issues by tool.Returns the information messages of the static analysis run.edu.hm.hafner.analysis.Report
Returns all issues of the associated static analysis run.Returns the label provider to render the localized labels.getLocalizedSeverity
(edu.hm.hafner.analysis.Severity severity) Returns a localized severity name.Returns the UI model for an ECharts doughnut chart that shows the issues in modified code.edu.hm.hafner.analysis.Report
Returns all new issues of the associated static analysis run.getNewVersusFixedTrend
(String configuration) Returns the UI model for an ECharts line chart that shows the new and fixed issues.edu.hm.hafner.analysis.Report
Returns all outstanding issues of the associated static analysis run.final Run
<?, ?> getOwner()
Returns the build as owner of this object.Returns the UI model for an ECharts doughnut chart that shows the severities.Returns the label provider for the localized tab names.io.jenkins.plugins.datatables.TableModel
getTableModel
(String id) Returns the UI model for the specified table.getToolsTrend
(String configuration) Returns the UI model for an ECharts line chart that shows the issues by tool.Returns the UI model for an ECharts doughnut chart that shows the new, fixed, and outstanding issues.getUrl()
Returns the (relative) URL of this model object.getUrlForBuild
(String build, String detailsUrl) Returns the URL for same results of the selected build.boolean
Returns whether there are any issues in the associated static analysis run that are part of modified code.boolean
Returns whether author and commit information should be shown or not.final boolean
Returns whether this build is the last available build.boolean
Returns whether SCM forensics will be shown or not.boolean
Returns whether a health report has been enabled.Resets the quality gate for the owner of this view.Methods inherited from class io.jenkins.plugins.datatables.DefaultAsyncTableContentProvider
getTableRows
-
Constructor Details
-
IssuesDetail
public IssuesDetail(Run<?, ?> owner, AnalysisResult result, edu.hm.hafner.analysis.Report report, edu.hm.hafner.analysis.Report newIssues, edu.hm.hafner.analysis.Report outstandingIssues, edu.hm.hafner.analysis.Report fixedIssues, String displayName, String url, StaticAnalysisLabelProvider labelProvider, Charset sourceEncoding) Creates a new detail model with the corresponding viewIssuesDetail/index.jelly
.- Parameters:
owner
- the associated build/run of this viewresult
- the analysis resultreport
- all issues that should be shown in this details viewnewIssues
- all new issuesoutstandingIssues
- all outstanding issuesfixedIssues
- all fixed issuesdisplayName
- the human-readable name of this view (shown in breadcrumb)url
- the relative URL of this viewlabelProvider
- the label provider for the static analysis toolsourceEncoding
- the encoding to use when displaying source files
-
IssuesDetail
public IssuesDetail(Run<?, ?> owner, AnalysisResult result, edu.hm.hafner.analysis.Report report, edu.hm.hafner.analysis.Report newIssues, edu.hm.hafner.analysis.Report outstandingIssues, edu.hm.hafner.analysis.Report fixedIssues, String displayName, String url, StaticAnalysisLabelProvider labelProvider, Charset sourceEncoding, HealthDescriptor healthDescriptor) Creates a new detail model with the corresponding viewIssuesDetail/index.jelly
.- Parameters:
owner
- the associated build/run of this viewresult
- the analysis resultreport
- all issues that should be shown in this details viewnewIssues
- all new issuesoutstandingIssues
- all outstanding issuesfixedIssues
- all fixed issuesdisplayName
- the human-readable name of this view (shown in breadcrumb)url
- the relative URL of this viewlabelProvider
- the label provider for the static analysis toolsourceEncoding
- the encoding to use when displaying source fileshealthDescriptor
- health descriptor
-
IssuesDetail
public IssuesDetail(Run<?, ?> owner, AnalysisResult result, StaticAnalysisLabelProvider labelProvider, HealthDescriptor healthDescriptor, Charset sourceEncoding) Creates a new detail model with the corresponding viewIssuesDetail/index.jelly
.- Parameters:
owner
- the associated build/run of this viewresult
- the analysis resultlabelProvider
- the label provider for the static analysis toolhealthDescriptor
- the health descriptorsourceEncoding
- the charset to visualize source files with
-
-
Method Details
-
getErrorMessages
Returns the error messages of the static analysis run.- Returns:
- the error messages
-
getInfoMessages
Returns the information messages of the static analysis run.- Returns:
- the information messages
-
getApi
Gets the remote API for this action. Depending on the path, a different result is selected.- Returns:
- the remote API
-
getLabelProvider
Returns the label provider to render the localized labels.- Returns:
- the label provider
-
getTableModel
Returns the UI model for the specified table.- Specified by:
getTableModel
in interfaceio.jenkins.plugins.datatables.AsyncTableContentProvider
- Parameters:
id
- the ID of the table- Returns:
- the UI model as JSON
-
resetReference
Resets the quality gate for the owner of this view.- Returns:
- unused string (since Firefox requires that Ajax calls return something)
-
getUrlForBuild
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 results- Returns:
- the URL to the results or an empty string if the results are not available
-
getSeverityModel
Returns the UI model for an ECharts doughnut chart that shows the severities.- Returns:
- the UI model as JSON
-
getTrendModel
Returns the UI model for an ECharts doughnut chart that shows the new, fixed, and outstanding issues.- Returns:
- the UI model as JSON
-
getModifiedModel
Returns the UI model for an ECharts doughnut chart that shows the issues in modified code.- Returns:
- the UI model as JSON
-
getBuildTrend
Returns the UI model for an ECharts line chart that shows the issues stacked by severity.- Parameters:
configuration
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getToolsTrend
Returns the UI model for an ECharts line chart that shows the issues by tool.- Parameters:
configuration
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getNewVersusFixedTrend
Returns the UI model for an ECharts line chart that shows the new and fixed issues.- Parameters:
configuration
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getHealthTrend
Returns the UI model for an ECharts line chart that shows the issues by tool.- Parameters:
configuration
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
isHealthReportEnabled
public boolean isHealthReportEnabled()Returns whether a health report has been enabled.- Returns:
true
if health reporting is enabled,false
otherwise
-
hasIssuesInModifiedCode
public boolean hasIssuesInModifiedCode()Returns whether there are any issues in the associated static analysis run that are part of modified code.- Returns:
true
if there are issues in modified code,false
otherwise
-
getIssues
public edu.hm.hafner.analysis.Report getIssues()Returns all issues of the associated static analysis run.- Returns:
- all issues
-
getNewIssues
public edu.hm.hafner.analysis.Report getNewIssues()Returns all new issues of the associated static analysis run. I.e., all issues that are part of the current report but have not been shown up in the previous report.- Returns:
- all new issues
-
getFixedIssues
public edu.hm.hafner.analysis.Report getFixedIssues()Returns all fixed issues of the associated static analysis run. I.e., all issues that are part of the previous report but are not present in the current report anymore.- Returns:
- all fixed issues
-
getOutstandingIssues
public edu.hm.hafner.analysis.Report getOutstandingIssues()Returns all outstanding issues of the associated static analysis run. I.e., all issues that are part of the current and previous report.- Returns:
- all outstanding issues
-
isBlameVisible
public boolean isBlameVisible()Returns whether author and commit information should be shown or not.- Returns:
- on
true
the SCM blames will be shown in the UI
-
isForensicsVisible
public boolean isForensicsVisible()Returns whether SCM forensics will be shown or not.- Returns:
- on
true
the SCM forensics will be shown in the UI
-
canDisplayFile
public boolean canDisplayFile(edu.hm.hafner.analysis.Issue issue) Returns whether the affected file of the specified issue can be shown in the UI.- Parameters:
issue
- the issue to get the affected file for- Returns:
true
if the file could be shown,false
otherwise
-
getFileDisplayName
Returns the short name for an absolute path name.- Parameters:
issue
- the issue to get the file name for- Returns:
- the file name
-
getTabLabelProvider
Returns the label provider for the localized tab names.- Returns:
- the label provider
-
getLocalizedSeverity
Returns a localized severity name.- Parameters:
severity
- the severity- Returns:
- localized severity name
-
getDetails
Returns statics for the specified property.- Parameters:
propertyName
- the name of the property- Returns:
- the statistics
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
getDynamic
public Object getDynamic(String link, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) Returns a new subpage for the selected link.- Parameters:
link
- the link to identify the subpage to showrequest
- Stapler requestresponse
- Stapler response- Returns:
- the new subpage
-
getOwner
Returns the build as owner of this object.- Returns:
- the owner
-
isCurrent
public final boolean isCurrent()Returns whether this build is the last available build.- Returns:
true
if this build is the last available build
-
getUrl
Returns the (relative) URL of this model object.- Returns:
- this model objects' URL
-