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
Constructors Constructor Description 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
.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canDisplayFile(edu.hm.hafner.analysis.Issue issue)
Returns whether the affected file of the specified issue can be shown in the UI.Api
getApi()
Gets the remote API for this action.String
getBuildTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetBuildTrend(String)
String
getBuildTrend(String configuration)
Returns the UI model for an ECharts line chart that shows the issues stacked by severity.PropertyStatistics
getDetails(String propertyName)
Returns statics for the specified property.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.String
getFileDisplayName(edu.hm.hafner.analysis.Issue issue)
Returns the short name for an absolute path name.edu.hm.hafner.analysis.Report
getFixedIssues()
Returns all fixed issues of the associated static analysis run.String
getHealthTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetHealthTrend(String)
String
getHealthTrend(String configuration)
Returns the UI model for an ECharts line chart that shows the issues by tool.Collection<String>
getInfoMessages()
Returns the information messages of the static analysis run.edu.hm.hafner.analysis.Report
getIssues()
Returns all issues of the associated static analysis run.StaticAnalysisLabelProvider
getLabelProvider()
Returns the label provider to render the localized labels.String
getLocalizedSeverity(edu.hm.hafner.analysis.Severity severity)
Returns a localized severity name.edu.hm.hafner.analysis.Report
getNewIssues()
Returns all new issues of the associated static analysis run.String
getNewVersusFixedTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetNewVersusFixedTrend(String)
String
getNewVersusFixedTrend(String configuration)
Returns the UI model for an ECharts line chart that shows the new and fixed issues.edu.hm.hafner.analysis.Report
getOutstandingIssues()
Returns all outstanding issues of the associated static analysis run.Run<?,?>
getOwner()
Returns the build as owner of this object.String
getSeverityModel()
Returns the UI model for an ECharts doughnut chart that shows the severities.TabLabelProvider
getTabLabelProvider()
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.String
getToolsTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetToolsTrend(String)
String
getToolsTrend(String configuration)
Returns the UI model for an ECharts line chart that shows the issues by tool.String
getTrendModel()
Returns the UI model for an ECharts doughnut chart that shows the new, fixed, and outstanding issues.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.boolean
isBlameVisible()
Returns whether author and commit information should be shown or not.boolean
isCurrent()
Returns whether this build is the last available build.boolean
isForensicsVisible()
Returns whether SCM forensics will be shown or not.boolean
isHealthReportEnabled()
Returns whether a health report has been enabled.String
resetReference()
Resets the quality gate for the owner of this view.
-
-
-
Constructor Detail
-
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 issuesurl
- the relative URL of this viewdisplayName
- the human readable name of this view (shown in breadcrumb)labelProvider
- 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 issuesurl
- the relative URL of this viewdisplayName
- the human readable name of this view (shown in breadcrumb)labelProvider
- 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 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
-
getApi
public Api getApi()
Gets the remote API for this action. Depending on the path, a different result is selected.- Returns:
- the remote API
-
getLabelProvider
public StaticAnalysisLabelProvider getLabelProvider()
Returns the label provider to render the localized labels.- Returns:
- the label provider
-
getTableModel
public io.jenkins.plugins.datatables.TableModel getTableModel(String id)
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
@JavaScriptMethod public String resetReference()
Resets the quality gate for the owner of this view.- Returns:
- unused string (since Firefox requires that Ajax calls return something)
-
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 results- Returns:
- the URL to the results or an empty string if the results are not available
-
getSeverityModel
@JavaScriptMethod public String getSeverityModel()
Returns the UI model for an ECharts doughnut chart that shows the severities.- Returns:
- the UI model as JSON
-
getTrendModel
@JavaScriptMethod public String getTrendModel()
Returns the UI model for an ECharts doughnut chart that shows the new, fixed, and outstanding issues.- Returns:
- the UI model as JSON
-
getBuildTrend
@Deprecated public String getBuildTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetBuildTrend(String)
Returns the UI model for an ECharts line chart that shows the issues stacked by severity.- Parameters:
isBuildOnXAxis
- determines whether the Jenkins build number should be used on the X-axis or the date- 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 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
@Deprecated public String getToolsTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetToolsTrend(String)
Returns the UI model for an ECharts line chart that shows the issues by tool.- Parameters:
isBuildOnXAxis
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getToolsTrend
@JavaScriptMethod public String getToolsTrend(String configuration)
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
@Deprecated public String getNewVersusFixedTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetNewVersusFixedTrend(String)
Returns the UI model for an ECharts line chart that shows the new and fixed issues.- Parameters:
isBuildOnXAxis
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getNewVersusFixedTrend
@JavaScriptMethod public String getNewVersusFixedTrend(String configuration)
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
@Deprecated public String getHealthTrend(boolean isBuildOnXAxis)
Deprecated.replaced bygetHealthTrend(String)
Returns the UI model for an ECharts line chart that shows the issues by tool.- Parameters:
isBuildOnXAxis
- determines whether the Jenkins build number should be used on the X-axis or the date- Returns:
- the UI model as JSON
-
getHealthTrend
@JavaScriptMethod public String getHealthTrend(String configuration)
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
-
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
public String getFileDisplayName(edu.hm.hafner.analysis.Issue issue)
Returns the short name for an absolute path name.- Parameters:
issue
- the issue to get the file name for- Returns:
- the file name
-
getTabLabelProvider
public TabLabelProvider getTabLabelProvider()
Returns the label provider for the localized tab names.- Returns:
- the label provider
-
getLocalizedSeverity
public String getLocalizedSeverity(edu.hm.hafner.analysis.Severity severity)
Returns a localized severity name.- Parameters:
severity
- the severity- Returns:
- localized severity name
-
getDetails
public PropertyStatistics getDetails(String propertyName)
Returns statics for the specified property.- Parameters:
propertyName
- the name of the property- Returns:
- the statistics
-
getDisplayName
public String 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 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
-
getOwner
public final Run<?,?> 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
public String getUrl()
Returns the (relative) URL of this model object.- Returns:
- this model objects' URL
-
-